Rich Content
ImageGallery
client51.75 kB
@stellaria/nebula-webImageGalleryPropsPreview
Props
13| Prop | Type | Default |
|---|---|---|
className | string | — |
cols | number | — |
empty | ReactNode | — |
gap | "xs" | "sm" | "md" | "lg" | "sm" |
images required | readonly LightboxImage[] | — |
label | string | — |
labels | Partial<LightboxLabels> | — |
minColWidth | number | 160 |
onSelect | ((index: number) => void) | — |
ratio | number | 4 / 3 |
withLightbox | boolean | true |
withSlideshow | boolean | false |
withThumbnails | boolean | true |
Slot props
2Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
tileImageProps The thumbnail of each tile. Its `alt` comes from the image, and it is only rendered when the tile is not pressable. | Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> | — |
tileProps Every tile. It spreads over ALL of them, and serves two elements: a `button` when the tile opens the viewer or there is an `onSelect`, and a `div` when it leads nowhere. It is also the route to the corner of the tile —`tileProps={{ r: "lg" }}`—, which used to be the `radius` prop. | BoxSlotProps | — |
Also accepts
On top of its own props, this component forwards these groups.
Style props · 127