Skip to main content

Interface: GridComponents<Context>

Type parameters

NameType
Contextany

Properties

Item

Optional Item: ComponentType<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "children"> & { data-index: number } & RefAttributes<HTMLDivElement> & { context?: Context }>

Set to customize the item wrapping element. Use only if you would like to render list from elements different than a div.


Scroller

Optional Scroller: ComponentType<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "children" | "tabIndex"> & { data-testid?: string ; data-virtuoso-scroller?: boolean } & RefAttributes<HTMLDivElement> & { context?: Context }>

Set to customize the outermost scrollable element. This should not be necessary in general, as the component passes its HTML attribute props to it.


List

Optional List: ComponentType<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "children"> & { data-testid: string } & RefAttributes<HTMLDivElement> & { context?: Context }>

Set to customize the items wrapper. Use only if you would like to render list from elements different than a div.


Optional Header: ComponentType<{ context?: Context }>

Set to render a component at the top of the list.

The header remains above the top items and does not remain sticky.


Optional Footer: ComponentType<{ context?: Context }>

Set to render a component at the bottom of the list.


ScrollSeekPlaceholder

Optional ScrollSeekPlaceholder: ComponentType<GridScrollSeekPlaceholderProps & { context?: Context }>

Set to render an item placeholder when the user scrolls fast. See the scrollSeekConfiguration property for more details.