VirtualList
function VirtualList<Data, C>(props): Element;React component. Small abstraction, which in 90% cases allows to avoid hook boilerplate.
Type Parameters
Data
Data = unknown
C
C extends ElementType = "div"
Parameters
props
ListProps<C, Data> & Omit<ComponentProps<C>, "children" | "ref">
Returns
Element
Related examples
- Material UireactVirtualList supports the component prop, so it can be integrated with Material UI. Pass disablePadding to MuiList to preserve the virtual layout.
- HorizontalreactThis example virtualizes a horizontal collection: columns are measured and positioned along the x-axis while the browser keeps a native horizontal scrollbar.
- Simple ListreactThis is the smallest complete virtual list for each framework. Application data stays in the framework while the adapter renders and measures only the current visible range.
- Sticky Header And FooterreactThis example keeps a header and footer inside the scrolling viewport while the virtual item range remains measured and independently positioned.
- Variable SizereactThis example renders rows whose heights differ and can change after mount. Mounted items report their real border-box size, replacing the initial estimate without requiring application-side layout reads.
- Live FeedreactThis example appends variable-height messages while demonstrating end-anchor behavior: a reader at the end stays at the newest message, while a reader who scrolled upward keeps the current viewport.