
Description
react-window is a set of React components for rendering large lists and tables efficiently, by drawing only the rows that are visible on screen rather than every row in the data. The project says it is used in many places, including the React DevTools and the Replay browser. The main List component takes a rowComponent that renders one row, a rowCount for the number of items, and a rowHeight, which can be a fixed number of pixels, a percentage of the list's height, a function that returns the height for a given index, or a dynamic height cache from the useDynamicRowHeight hook, although the README warns that dynamic heights are less efficient than known sizes. A rowProps object passes extra values to the row component and triggers a re-render when it changes. Optional props include a className, a style, children for overlays or tooltips, a defaultHeight for server rendering, a listRef for scrolling through an imperative API, and an onResize callback. The library ships TypeScript definitions in its dist folder, and it exports useListRef and useListCallbackRef for TypeScript projects. The installation is a single npm package, and the full documentation, including a Table component for tabular data, is on the project's website at react-window.vercel.app. The author invites support through GitHub or Open Collective sponsorship. The source is on GitHub under bvaughn, and the README includes a frequently asked questions section.…
Highlights
- Renders only visible rows
- List and table components
- Fixed, percentage and dynamic row heights
- TypeScript definitions included
- Imperative scroll API
- Documentation site with examples
Ratings & Reviews
No ratings yet
Be the first to rate react-window.
People also visit
react-window FAQ
What does react-window do?
It renders large lists and tables efficiently by drawing only the rows that are visible.
How do I set row heights?
A number of pixels, a percentage of the list height, a function of the index, or the useDynamicRowHeight cache for rows of varying height, which the README notes is less efficient.
Does it include TypeScript types?
Yes. The definitions are included in the published dist folder, and the README exports hooks for TypeScript projects.
How do I install it?
Install the react-window package from npm, as the installation section describes.
Where is the documentation?
On the project website at react-window.vercel.app, with an FAQ linked from the README.
How can I support it?
Through GitHub Sponsors or Open Collective, according to the README.
What are the best react-window alternatives?
Popular alternatives to react-window include react-virtualized, @box/react-virtualized and rc-virtual-list. See all react-window alternatives

















