Skip to content
Data Display

GridList

client43.25 kB
@stellaria/nebula-webGridListProps

Preview

Props

16
PropTypeDefault

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

number220

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

booleantrue

Slot props

2

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

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