Virtualized List
A high-performance scrollable list that renders only visible items, supporting tens of thousands of rows at 60 FPS with minimal memory footprint.
import { VirtualizedList } from "@/components/ui/virtualizedList/virtualizedList";npx @bloomui-react/cli add virtualizedListDefault
A list of 10,000 items rendered with smooth scrolling. Only visible rows are mounted in the DOM.
10,000 items — scroll to test
Custom Render
Use the renderItem prop to display complex row layouts with avatars and badges.
5,000 users
User 1
user1@example.com
User 2
user2@example.com
User 3
user3@example.com
User 4
user4@example.com
User 5
user5@example.com
User 6
user6@example.com
User 7
user7@example.com
User 8
user8@example.com
User 9
user9@example.com
User 10
user10@example.com
User 11
user11@example.com
User 12
user12@example.com
Dynamic Item Height Calculation
Calculate varying row heights dynamically using getItemHeight={(item, index) => number}.
Scroll to Index Method
Imperatively jump to any item index in the virtualized list using listRef.current.scrollToIndex(index).
Infinite Scroll Loading
Automatically trigger data fetching when scrolling near bottom threshold with onEndReached.
| Prop | Type | Default | Description |
|---|---|---|---|
| items | T[] | — | Array of data items to render. |
| itemHeight | number | — | Fixed height in pixels for each row. |
| height | number | — | Container height in pixels. |
| renderItem | (item: T, index: number) => ReactNode | — | Render function for each row. |
| overscan | number | 5 | Extra items rendered above/below viewport for smooth scrolling. |
| className | string | — | Additional CSS classes for the container. |