
react-window is a component library that helps render large lists of data quickly and without the performance problems that often go along with rendering a lot of data. It's used in a lot of places, from React DevTools to the Replay browser.
If you like this project there are several ways to support it:
The following wonderful companies and individuals have sponsored react-window:
Begin by installing the library from NPM:
npm install react-window
TypeScript definitions are included within the published dist folder
Frequently asked questions can be found here.
Documentation for this project is available at react-window.vercel.app; version 1.x documentation can be found at react-window-v1.vercel.app.
Renders data with many rows.
| Name | Description |
|---|---|
| rowComponent |
React component responsible for rendering a row.
This component will receive an index and style prop by default.
Additionally it will receive prop values passed to rowProps.
ℹ️ The prop types for this component are exported as RowComponentProps
|
| rowCount | Number of items to be rendered in the list. |
| rowHeight |
Row height; the following formats are supported:
|
| rowProps |
Additional props to be passed to the row-rendering component.
List will automatically re-render rows when values in this object change.
⚠️ This object must not contain ariaAttributes, index, or style props.
|
| Name | Description |
|---|---|
| className | CSS class name. |
| style | Optional CSS properties. The list of rows will fill the height defined by this style. |
| children | Additional content to be rendered within the list (above cells). This property can be used to render things like overlays or tooltips. |
| defaultHeight | Default height of list for initial render. This value is important for server rendering. |
| listRef |
Ref used to interact with this component's imperative API.
This API has imperative methods for scrolling and a getter for the outermost DOM element.
ℹ️ The useListRef and useListCallbackRef hooks are exported for convenience use in TypeScript projects.
|
| onResize | Callback notified when the List's outermost HTMLElement resizes. This may be used to (re)scroll a row into view. |
| onRowsRendered | Callback notif |
$ claude mcp add react-window \
-- python -m otcore.mcp_server <graph>