Figure
Show an image with stable dimensions and an optional caption.
On this page
View code
import Figure from "@chitrank2050/monoline-docs/components/Figure.astro";
<Figure
src="/assets/build-flow.svg"
alt="Content and configuration become a static documentation site"
width={360}
height={288}
/>Usage
Supply accurate dimensions to reserve space. Images load lazily; use meaningful alt text for informative diagrams.
Captioned image
View code
import Figure from "@chitrank2050/monoline-docs/components/Figure.astro";
<Figure
src="/assets/build-flow.svg"
alt="Documentation build flow"
width={360}
height={288}
caption="The build produces portable static output."
/>API reference
| Name | Type | Default | Description |
|---|---|---|---|
src | string | Required | Image source; local /assets paths honor the base. |
alt | string | Required | Image description; empty only for decorative images. |
width | number | Required | Positive integer intrinsic width. |
height | number | Required | Positive integer intrinsic height. |
caption | string | — | Optional visible caption. |
Behavior and accessibility
Provide accurate image dimensions and useful alternative text. Captions explain the image in context; decorative images may use an explicitly empty alt value.