Figure

A figure with an optional caption.

Props

A Figure component has the following properties:

PropRequiredDescription
captionnoThe caption of the figure.
classnoAdditional Tailwind classes.

Examples

The inside of the market hall in Rotterdam with a huge glass window in the back.
The market hall in Rotterdam.
<script lang="ts">
	import { Figure } from '$lib/components/index.js';
	import src from './mike-van-den-bos-fbQv3cx--bM-unsplash.jpg?enhanced';
</script>

<Figure caption="The market hall in Rotterdam.">
	<enhanced:img
		{src}
		alt="The inside of the market hall in Rotterdam with a huge glass window in the back."
		sizes="(max-width: 1024px) 100vw, 1024px"
	/>
</Figure>