Data Display
GridList
client43.25 kB
@stellaria/nebula-webGridListPropsPreview
Props
16| Prop | Type | Default |
|---|---|---|
className | string | — |
cols | number | — |
defaultMode | GridListMode | "grid" |
empty | ReactNode | — |
gap | "xs" | "sm" | "md" | "lg" | "md" |
getKey required | (item: T, index: number) => string | — |
items required | readonly T[] | — |
label | string | — |
minColWidth | number | 220 |
mode | GridListMode | — |
modeLabels | Partial<Record<GridListMode, string>> | — |
modes | readonly GridListMode[] | ["list", "grid", "carousel"] |
onModeChange | ((mode: GridListMode) => void) | — |
renderItem required | (item: T, mode: GridListMode, index: number) => ReactNode | — |
switcherLabel Names the view switcher for a screen reader. It has no visible text of its own. | string | "View mode" |
withSwitcher | boolean | true |
Slot props
2Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
itemProps Every cell. It spreads over ALL of them: they come from `items`, not from composition. | BoxSlotProps | — |
toolbarProps The view-switcher bar. Only with `withSwitcher` and more than one mode. | BoxSlotProps | — |
Also accepts
On top of its own props, this component forwards these groups.
Style props · 127