Skip to content
Domain-Specific

InfiniteList

client80 kB
@stellaria/nebula-webInfiniteListProps

Preview

Props

19
PropTypeDefault

autoLoad

booleantrue

className

string

—

empty

ReactNode

—

error

ReactNode

—

gap

"xs" | "sm" | "md" | "lg" | "none""sm"

getKey

required
(item: T, index: number) => string

—

getPageItems

((page: TPage) => readonly T[])

—

hasMore

boolean

—

items

readonly T[]

—

label

string

—

labels

Partial<InfiniteListLabels>

—

loading

boolean

—

loadingMore

boolean

—

onLoadMore

(() => void)

—

query

InfiniteQueryLike<TPage>

—

renderItem

required
(item: T, index: number) => ReactNode

—

rootMargin

string"200px"

skeleton

ReactNode

—

withEndMessage

booleanfalse

Slot props

3

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

PropTypeDefault

itemProps

Every entry. It spreads over all of them; `renderItem` renders their content.

BoxSlotProps

—

listProps

The list. Its gap comes from `gap`; the slot composes with it.

BoxSlotProps

—

liveProps

The region that announces loading. It carries `role="status"`, so it reads itself out.

BoxSlotProps

—

Also accepts

On top of its own props, this component forwards these groups.

Style props · 127