
<Stack style={{ maxWidth: "24rem" }}>
<ImageGallery
images={[{ url: "/share.png", alt: "Picture 1" }, { url: "/apple-touch-icon.png", alt: "Picture 2" }, { url: "/logo.svg", alt: "Picture 3" }]}
columns={3}
aspectRatio="1 / 1"
fit="contain"
rounded
/>
</Stack>import { ImageGallery } from "@dash/server";Prop | Type | Description |
|---|---|---|
| images (required) | ImageGalleryItem[] | |
| columns | 2 | 3 | 4 | Thumbnails per row (default 3), each that share of the large picture's width; a short last row is centered. Fewer on a very narrow box, so each stays a comfortable target. |
| aspectRatio | string | number | The shape of the large picture and of every thumbnail: `"1 / 1"` (default), `"4 / 3"` or `1.5`. |
| fit | "cover" | "contain" | How each picture fills its box (default `cover`). |
| loading | "lazy" | "eager" | `lazy` (default) defers the large picture until it nears the viewport. Thumbnails are always lazy. |
| rounded | boolean | "full" | Corners follow the theme: `true` is `--radius`, `"full"` is `--radius-full`. |
| label | string | The name of the group of pictures. Set by the client from `dash.imageGallery.label`. |
| pictureLabel | string | The name of a thumbnail with no `alt`, with `{{current}}` and `{{count}}`. Set by the client from `dash.imageGallery.picture`. |