{"_id":"react-window@2.5.4","bugs":{"url":"https://github.com/bvaughn/react-window/issues"},"dist":{"shasum":"9365f0e7df7051ca89b274a4e27009e0d7654cde","tarball":"http://registry-npm.ywwl.com/react-window/download/react-window-2.5.4.tgz","fileCount":8,"integrity":"sha512-6fvaimB9b4ubVnYiTrFUJJS+sgV+z9Lk2llcZH6U+U/2zFSAfhfgZEOpJTC0Mj/WHxYq3GhniM5CReSExM7qRQ==","signatures":[{"sig":"MEUCIQD9l5rNkOafKAL1mzQ/vtehW4Hu53diQD4RSovEBD5ZiAIgZhNP6VFg+k2S7JEgW+GmWkyyuJHrw7iSF+dNw0wErOk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDa46Am1UMIyfvEo8dIdMvTJSdGr1KVGOtAFMllMmokywIgRPNJJBLtcGG8eJ400g281w+rVVi6tTG4Lg/Eu2t9iq0="}],"unpackedSize":439099,"size":108145,"noattachment":false,"key":"/react-window/-/react-window-2.5.4.tgz"},"main":"dist/react-window.cjs","name":"react-window","type":"module","types":"dist/react-window.d.ts","author":{"url":"https://github.com/bvaughn/","name":"Brian Vaughn","email":"brian.david.vaughn@gmail.com"},"module":"dist/react-window.js","gitHead":"095d872c99ba6dac13e9fd79e4db664802b3c940","license":"MIT","scripts":{"dev":"vite","tsc":"tsc -b","lint":"eslint .","test":"vitest","build":"pnpm run /^build:.*/","compile":"pnpm run --sequential /^compile:.*/","preview":"vite preview","test:ci":"vitest run","e2e:test":"pnpm -C integrations/tests run test","prettier":"prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"","build:lib":"cross-env TARGET=lib vite build","build:docs":"cross-env TARGET=docs vite build","prerelease":"rm -rf dist && pnpm run build:lib","test:debug":"vitest --inspect-brk=127.0.0.1:3000 --no-file-parallelism","e2e:install":"pnpm -C integrations/tests exec playwright install --with-deps chromium firefox webkit","prettier:ci":"prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"","compile:docs":"tsx ./scripts/compile-docs","compile:examples":"tsx ./scripts/compile-examples","dev:integrations":"pnpm run /^dev:integrations:.*/","compress:og-image":"tsx ./scripts/compress-og-image","compile:search-index":"tsx ./scripts/compile-search-index","dev:integrations:next":"pnpm -C integrations/next/ run dev","dev:integrations:vike":"pnpm -C integrations/vike/ run dev","dev:integrations:vite":"pnpm -C integrations/vite/ run dev"},"version":"2.5.4","_npmUser":{"name":"brianvaughn","email":"briandavidvaughn@gmail.com"},"homepage":"https://react-window.vercel.app/","repository":{"url":"git+https://github.com/bvaughn/react-window.git","type":"git"},"_npmVersion":"11.4.2","description":"<img src=\"https://react-window.vercel.app/og.png\" alt=\"react-window logo\" width=\"400\" height=\"210\" />","directories":{},"lint-staged":{"**/*":"pnpm exec prettier --write --ignore-unknown"},"maintainers":[{"name":"brianvaughn","email":"briandavidvaughn@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.3.0","contributors":[{"url":"https://github.com/bvaughn/","name":"Brian Vaughn","email":"brian.david.vaughn@gmail.com"}],"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","clsx":"^2.1.1","vite":"^7.0.4","bytes":"^3.1.2","husky":"^9.1.7","jsdom":"^26.1.0","react":"^19.2.3","sharp":"^0.34.5","eslint":"^9.30.1","marked":"^16.4.1","vitest":"^3.2.4","csstype":"^3.1.3","globals":"^16.3.0","postcss":"^8.5.6","ts-node":"^10.9.2","zustand":"^5.0.7","prettier":"3.6.2","cross-env":"^10.1.0","react-dom":"^19.2.3","@eslint/js":"^9.30.1","typescript":"~5.8.3","@types/node":"^24.2.0","lint-staged":"^16.1.4","markdown-it":"^14.1.0","tailwindcss":"^4.1.11","@types/bytes":"^3.1.5","@types/react":"^19.2.3","@types/sharp":"^0.32.0","tailwind-merge":"^3.3.1","ts-blank-space":"^0.6.2","react-lib-tools":"0.0.78","vite-plugin-dts":"^4.5.4","@heroicons/react":"^2.2.0","@types/react-dom":"^19.2.3","react-router-dom":"^7.6.3","vite-plugin-svgr":"^4.3.0","@headlessui/react":"^2.2.4","@tailwindcss/vite":"^4.1.11","typescript-eslint":"^8.35.1","@types/markdown-it":"^14.1.2","react-error-boundary":"^6.0.0","rollup-plugin-terser":"^7.0.2","@tailwindplus/elements":"^1.0.5","@testing-library/react":"^16.3.0","typescript-json-schema":"^0.65.1","@headlessui/tailwindcss":"^0.2.2","react-docgen-typescript":"^2.4.0","@vitejs/plugin-react-swc":"^3.10.2","rollup-plugin-visualizer":"^6.0.3","@testing-library/jest-dom":"^6.6.4","eslint-plugin-react-hooks":"^5.2.0","rollup-preserve-directives":"^1.1.3","@testing-library/user-event":"^14.6.1","eslint-plugin-react-refresh":"^0.4.20","prettier-plugin-tailwindcss":"^0.7.1","@csstools/postcss-oklab-function":"^4.0.11"},"react-lib-tools":{"devServerPort":3100},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@types/react":"^18.2.6 || ^19.0.0"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-window_2.5.4_1795279590437_0.9415284303840176"},"readme":"<img src=\"https://react-window.vercel.app/og.png\" alt=\"react-window logo\" width=\"400\" height=\"210\" />\n\n`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.\n\n## Support\n\nIf you like this project there are several ways to support it:\n\n- [Become a GitHub sponsor](https://github.com/sponsors/bvaughn/)\n- [Become an Open Collective sponsor](https://opencollective.com/react-window#sponsor)\n- or [buy me a coffee](http://givebrian.coffee/)\n\nThe following wonderful companies and individuals have sponsored react-window:\n\n<a href=\"https://opencollective.com/react-window/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/0/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/1/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/2/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/3/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/4/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/5/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/6/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/7/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/8/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/9/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/10/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/11/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/12/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/13/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/14/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/15/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/16/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/17/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/18/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/19/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/20/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/21/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/22/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/23/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/24/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/25/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/26/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/27/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/28/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/sponsor/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/sponsor/29/avatar.svg\"></a>\n\n<a href=\"https://opencollective.com/react-window/backer/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/0/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/1/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/2/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/3/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/4/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/5/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/6/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/7/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/8/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/9/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/10/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/10/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/11/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/11/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/12/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/12/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/13/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/13/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/14/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/14/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/15/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/15/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/16/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/16/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/17/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/17/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/18/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/18/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/19/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/19/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/20/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/20/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/21/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/21/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/22/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/22/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/23/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/23/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/24/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/24/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/25/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/25/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/26/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/26/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/27/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/27/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/28/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/28/avatar.svg\"></a> <a href=\"https://opencollective.com/react-window/backer/29/website\" target=\"_blank\"><img src=\"https://opencollective.com/react-window/backer/29/avatar.svg\"></a>\n\n## Installation\n\nBegin by installing the library from NPM:\n\n```sh\nnpm install react-window\n```\n\n## TypeScript types\n\nTypeScript definitions are included within the published `dist` folder\n\n## FAQs\n\nFrequently asked questions can be found [here](https://react-window.vercel.app/common-questions).\n\n## Documentation\n\nDocumentation for this project is available at [react-window.vercel.app](https://react-window.vercel.app/).\n\n<!-- react-lib-tools:api:begin -->\n\n## Components\n\n### Grid\n\nRenders data with many rows and columns.\n\nℹ️ Unlike `List` rows, `Grid` cell sizes must be known ahead of time.\nEither static sizes or something that can be derived (from the data in `CellProps`) without rendering.\n\n#### Required props\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>cellComponent</td>\n      <td><p>React component responsible for rendering a cell.</p>\n<p>This component will receive <code>columnIndex</code>, <code>rowIndex</code>, and <code>style</code> props by default.\nAdditionally it will receive prop values passed to <code>cellProps</code>.</p>\n<p>ℹ️ The prop types for this component are exported as <code>CellComponentProps</code></p>\n</td>\n    </tr>\n    <tr>\n      <td>cellProps</td>\n      <td><p>Additional props to be passed to the cell-rendering component.\nGrid will automatically re-render cells when values in this object change.</p>\n<p>⚠️ This object must not contain <code>ariaAttributes</code>, <code>columnIndex</code>, <code>rowIndex</code>, or <code>style</code> props.</p>\n</td>\n    </tr>\n    <tr>\n      <td>columnCount</td>\n      <td><p>Number of columns to be rendered in the grid.</p>\n</td>\n    </tr>\n    <tr>\n      <td>columnWidth</td>\n      <td><p>Column width; the following formats are supported:</p>\n<ul>\n<li>number of pixels (number)</li>\n<li>percentage of the grid&#39;s current width (string)</li>\n<li>function that returns the column width (in pixels) given an index and <code>cellProps</code></li>\n</ul>\n<p>ℹ️ Percentage widths can&#39;t be resolved during server rendering unless a <code>defaultWidth</code> (or a pixel width via the <code>style</code> prop) is specified.</p>\n</td>\n    </tr>\n    <tr>\n      <td>rowCount</td>\n      <td><p>Number of rows to be rendered in the grid.</p>\n</td>\n    </tr>\n    <tr>\n      <td>rowHeight</td>\n      <td><p>Row height; the following formats are supported:</p>\n<ul>\n<li>number of pixels (number)</li>\n<li>percentage of the grid&#39;s current height (string)</li>\n<li>function that returns the row height (in pixels) given an index and <code>cellProps</code></li>\n</ul>\n<p>ℹ️ Percentage heights can&#39;t be resolved during server rendering unless a <code>defaultHeight</code> (or a pixel height via the <code>style</code> prop) is specified.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n#### Optional props\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>className</td>\n      <td><p>CSS class name.</p>\n</td>\n    </tr>\n    <tr>\n      <td>dir</td>\n      <td><p>Indicates the directionality of grid cells.</p>\n<p>ℹ️ The directionality of an ancestor element can&#39;t be detected during server rendering;\nspecify this prop explicitly for server-rendered right-to-left grids.</p>\n<p>ℹ️ See HTML <code>dir</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/dir\">global attribute</a> for more information.</p>\n</td>\n    </tr>\n    <tr>\n      <td>style</td>\n      <td><p>Optional CSS properties.\nThe grid of cells will fill the height and width defined by this style.</p>\n</td>\n    </tr>\n    <tr>\n      <td>children</td>\n      <td><p>Additional content to be rendered within the grid (above cells).\nThis property can be used to render things like overlays or tooltips.</p>\n</td>\n    </tr>\n    <tr>\n      <td>columnKey</td>\n      <td><p>Grids use the column index as a <code>key</code> by default.\nThis prop can be used along with the <code>rowKey</code> prop to provide a custom <code>key</code> value.</p>\n<p>ℹ️ Custom keys can ensure better UX for sortable or filterable grids,\nparticularly if your cell components are stateful.\nRefer to the <a href=\"https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key\">React documentation</a> for more info.</p>\n<p>⚠️ This prop cannot be auto-memoized because it is called during render.\nIt is important to always <code>useCallback</code> for this prop; do not use an inline function.</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultHeight</td>\n      <td><p>Default height of grid (in pixels) for initial render, before its actual height has been measured.</p>\n<p>ℹ️ Grids can&#39;t be measured during server rendering, so this value determines how many rows are server rendered.\nIt&#39;s recommended to set this to the expected height of the grid (or to specify a pixel height via the <code>style</code> prop).</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultScrollLeft</td>\n      <td><p>Initial horizontal scroll offset (in pixels) of the grid.\nThis value is only applied once, when the grid first mounts with at least one column.</p>\n<p>ℹ️ Server-rendered HTML can&#39;t be pre-scrolled, so server rendering always starts at the first column;\nthe default scroll offset is applied once the grid hydrates.</p>\n<p>⚠️ If the grid can&#39;t be scrolled that far when the offset is applied (e.g. it is hidden with <code>display: none</code>,\nor uses percentage column widths before its width has been measured), the offset is clamped or ignored and not retried.\nSpecify a <code>defaultWidth</code> (or a pixel width via the <code>style</code> prop) when using percentage column widths.</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultScrollTop</td>\n      <td><p>Initial vertical scroll offset (in pixels) of the grid.\nThis value is only applied once, when the grid first mounts with at least one row.</p>\n<p>ℹ️ Server-rendered HTML can&#39;t be pre-scrolled, so server rendering always starts at the first row;\nthe default scroll offset is applied once the grid hydrates.</p>\n<p>⚠️ If the grid can&#39;t be scrolled that far when the offset is applied (e.g. it is hidden with <code>display: none</code>,\nor uses percentage row heights before its height has been measured), the offset is clamped or ignored and not retried.\nSpecify a <code>defaultHeight</code> (or a pixel height via the <code>style</code> prop) when using percentage row heights.</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultWidth</td>\n      <td><p>Default width of grid (in pixels) for initial render, before its actual width has been measured.</p>\n<p>ℹ️ Grids can&#39;t be measured during server rendering, so this value determines how many columns are server rendered.\nIt&#39;s recommended to set this to the expected width of the grid (or to specify a pixel width via the <code>style</code> prop).</p>\n</td>\n    </tr>\n    <tr>\n      <td>gridRef</td>\n      <td><p>Imperative Grid API.</p>\n<p>ℹ️ The <code>useGridRef</code> and <code>useGridCallbackRef</code> hooks are exported for convenience in TypeScript projects.</p>\n</td>\n    </tr>\n    <tr>\n      <td>onCellsRendered</td>\n      <td><p>Callback notified when the range of rendered cells changes.</p>\n</td>\n    </tr>\n    <tr>\n      <td>onResize</td>\n      <td><p>Callback notified when the Grid&#39;s outermost HTMLElement resizes.\nThis may be used to (re)scroll a cell into view.</p>\n</td>\n    </tr>\n    <tr>\n      <td>overscanCount</td>\n      <td><p>How many additional rows/columns to render outside of the visible area.\nThis can reduce visual flickering near the edges of a grid when scrolling.</p>\n</td>\n    </tr>\n    <tr>\n      <td>rowKey</td>\n      <td><p>Grids use the row index as a <code>key</code> by default.\nThis prop can be used along with the <code>columnKey</code> prop to provide a custom <code>key</code> value.</p>\n<p>ℹ️ Custom keys can ensure better UX for sortable or filterable grids,\nparticularly if your cell components are stateful.\nRefer to the <a href=\"https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key\">React documentation</a> for more info.</p>\n<p>⚠️ This prop cannot be auto-memoized because it is called during render.\nIt is important to always <code>useCallback</code> for this prop; do not use an inline function.</p>\n</td>\n    </tr>\n    <tr>\n      <td>scrollElement</td>\n      <td><p>Element that scrolls the grid, for grids that scroll along with other content (e.g. the page):</p>\n<ul>\n<li>&quot;window&quot; to scroll with the page</li>\n<li>an ancestor element that scrolls (e.g. stored with a <code>useState</code> ref callback); <code>null</code> until it has mounted</li>\n</ul>\n<p>The grid renders at its full height and only renders the rows (and columns) visible within the scroll element&#39;s viewport.\nIts position within the scroll element is measured whenever it renders, scrolls, or resizes,\nand whenever content before it is resized, inserted, or removed (e.g. an image loading above the grid).</p>\n<ul>\n<li>columns scroll with the scroll element too if the grid is as wide as its content (e.g. <code>style={{ width: &quot;max-content&quot; }}</code>);\notherwise the grid fills the width of its parent and its columns scroll within it</li>\n<li><code>scrollToCell</code>, <code>scrollToColumn</code> and <code>scrollToRow</code> scroll whichever element scrolls each axis</li>\n<li><code>defaultHeight</code> and <code>defaultWidth</code> are used as the viewport size until the scroll element has been measured (e.g. during server rendering)</li>\n<li>percentage row heights and column widths are relative to the scroll element&#39;s viewport</li>\n<li><code>defaultScrollLeft</code> and <code>defaultScrollTop</code> are ignored</li>\n</ul>\n<p>ℹ️ While the scroll element is <code>null</code>, the grid renders the first rows (as it does during server rendering).</p>\n<p>⚠️ The grid&#39;s <code>onScroll</code> handler is only called when the grid scrolls its own columns;\nlisten to the scroll element&#39;s &quot;scroll&quot; events instead (or use the <code>useIsScrolling</code> hook).</p>\n</td>\n    </tr>\n    <tr>\n      <td>tagName</td>\n      <td><p>Can be used to override the root HTML element rendered by the Grid component.\nThe default value is &quot;div&quot;, meaning that Grid renders an HTMLDivElement as its root.</p>\n<p>⚠️ In most use cases the default ARIA roles are sufficient and this prop is not needed.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n### List\n\nRenders data with many rows.\n\n#### Required props\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>rowComponent</td>\n      <td><p>React component responsible for rendering a row.</p>\n<p>This component will receive an <code>index</code> and <code>style</code> prop by default.\nAdditionally it will receive prop values passed to <code>rowProps</code>.</p>\n<p>ℹ️ Spread <code>ariaAttributes</code> onto the row element; they identify it as a row (e.g. so that dynamic row heights are measured reliably)</p>\n<p>ℹ️ The prop types for this component are exported as <code>RowComponentProps</code></p>\n</td>\n    </tr>\n    <tr>\n      <td>rowCount</td>\n      <td><p>Number of items to be rendered in the list.</p>\n</td>\n    </tr>\n    <tr>\n      <td>rowHeight</td>\n      <td><p>Row height; the following formats are supported:</p>\n<ul>\n<li>number of pixels (number)</li>\n<li>percentage of the list&#39;s current height (string)</li>\n<li>function that returns the row height (in pixels) given an index and <code>rowProps</code></li>\n<li>dynamic row height cache returned by the <code>useDynamicRowHeight</code> hook</li>\n</ul>\n<p>ℹ️ Percentage heights can&#39;t be resolved during server rendering unless a <code>defaultHeight</code> (or a pixel height via the <code>style</code> prop) is specified.</p>\n<p>⚠️ Dynamic row heights are not as efficient as predetermined sizes.\nIt&#39;s recommended to provide your own height values if they can be determined ahead of time.</p>\n</td>\n    </tr>\n    <tr>\n      <td>rowProps</td>\n      <td><p>Additional props to be passed to the row-rendering component.\nList will automatically re-render rows when values in this object change.</p>\n<p>⚠️ This object must not contain <code>ariaAttributes</code>, <code>index</code>, or <code>style</code> props.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n#### Optional props\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>className</td>\n      <td><p>CSS class name.</p>\n</td>\n    </tr>\n    <tr>\n      <td>style</td>\n      <td><p>Optional CSS properties.\nThe list of rows will fill the height defined by this style.</p>\n</td>\n    </tr>\n    <tr>\n      <td>children</td>\n      <td><p>Additional content to be rendered within the list (above rows).\nThis property can be used to render things like overlays or tooltips.</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultHeight</td>\n      <td><p>Default height of list (in pixels) for initial render, before its actual height has been measured.</p>\n<p>ℹ️ Lists can&#39;t be measured during server rendering, so this value determines how many rows are server rendered.\nIt&#39;s recommended to set this to the expected height of the list (or to specify a pixel height via the <code>style</code> prop).</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultScrollOffset</td>\n      <td><p>Initial scroll offset (in pixels) of the list.\nThis value is only applied once, when the list first mounts with at least one row.</p>\n<p>ℹ️ Server-rendered HTML can&#39;t be pre-scrolled, so server rendering always starts at the first row;\nthe default scroll offset is applied once the list hydrates.</p>\n<p>⚠️ If the list can&#39;t be scrolled that far when the offset is applied (e.g. it is hidden with <code>display: none</code>,\nor uses percentage row heights before its height has been measured), the offset is clamped or ignored and not retried.\nSpecify a <code>defaultHeight</code> (or a pixel height via the <code>style</code> prop) when using percentage row heights.</p>\n</td>\n    </tr>\n    <tr>\n      <td>listRef</td>\n      <td><p>Ref used to interact with this component&#39;s imperative API.</p>\n<p>This API has imperative methods for scrolling and a getter for the outermost DOM element.</p>\n<p>ℹ️ The <code>useListRef</code> and <code>useListCallbackRef</code> hooks are exported for convenience in TypeScript projects.</p>\n</td>\n    </tr>\n    <tr>\n      <td>onResize</td>\n      <td><p>Callback notified when the List&#39;s outermost HTMLElement resizes.\nThis may be used to (re)scroll a row into view.</p>\n</td>\n    </tr>\n    <tr>\n      <td>onRowsRendered</td>\n      <td><p>Callback notified when the range of visible rows changes.</p>\n</td>\n    </tr>\n    <tr>\n      <td>overscanCount</td>\n      <td><p>How many additional rows to render outside of the visible area.\nThis can reduce visual flickering near the edges of a list when scrolling.</p>\n</td>\n    </tr>\n    <tr>\n      <td>rowKey</td>\n      <td><p>Lists use the row index as a <code>key</code> by default.\nThis prop can provide a custom <code>key</code> value.</p>\n<p>ℹ️ Custom keys can ensure better UX for sortable or filterable lists,\nparticularly if your row components are stateful.\nRefer to the <a href=\"https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key\">React documentation</a> for more info.</p>\n<p>⚠️ This prop cannot be auto-memoized because it is called during render.\nIt is important to always <code>useCallback</code> for this prop; do not use an inline function.</p>\n</td>\n    </tr>\n    <tr>\n      <td>scrollElement</td>\n      <td><p>Element that scrolls the list, for lists that scroll along with other content (e.g. the page):</p>\n<ul>\n<li>&quot;window&quot; to scroll with the page</li>\n<li>an ancestor element that scrolls (e.g. stored with a <code>useState</code> ref callback); <code>null</code> until it has mounted</li>\n</ul>\n<p>The list renders at its full height and only renders the rows visible within the scroll element&#39;s viewport.\nIts position within the scroll element is measured whenever it renders, scrolls, or resizes,\nand whenever content before it is resized, inserted, or removed (e.g. an image loading above the list).</p>\n<ul>\n<li><code>scrollToRow</code> scrolls the scroll element</li>\n<li><code>defaultHeight</code> is used as the viewport height until the scroll element has been measured (e.g. during server rendering)</li>\n<li>percentage row heights are relative to the scroll element&#39;s viewport height</li>\n<li><code>defaultScrollOffset</code> is ignored</li>\n</ul>\n<p>ℹ️ While the scroll element is <code>null</code>, the list renders the first rows (as it does during server rendering).</p>\n<p>⚠️ The list itself doesn&#39;t scroll, so its <code>onScroll</code> handler isn&#39;t called;\nlisten to the scroll element&#39;s &quot;scroll&quot; events instead (or use the <code>useIsScrolling</code> hook).</p>\n</td>\n    </tr>\n    <tr>\n      <td>tagName</td>\n      <td><p>Can be used to override the root HTML element rendered by the List component.\nThe default value is &quot;div&quot;, meaning that List renders an HTMLDivElement as its root.</p>\n<p>⚠️ In most use cases the default ARIA roles are sufficient and this prop is not needed.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n## Hooks\n\n### useDynamicRowHeight\n\nCreates a cache of measured row heights for lists whose rows can't be sized ahead of time.\nPass the returned value as the `rowHeight` prop of `List` (or the `itemSize` option of `useVirtualizer`);\nrendered rows are then measured with a `ResizeObserver` and the list updates as their sizes change.\n\nRows that have not yet been measured use the `defaultRowHeight` (or `initialRowHeights`, if provided).\n\nℹ️ Dynamic row heights are more expensive than fixed sizes; prefer a number or function when row heights are known.\n\n#### Parameters\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>defaultRowHeight</td>\n      <td><p>Estimated height (in pixels) of rows that have not yet been measured.</p>\n</td>\n    </tr>\n    <tr>\n      <td>initialRowHeights?</td>\n      <td><p>Row heights (in pixels) that are known or can be estimated ahead of time, e.g. estimated from each row&#39;s content.\nThis can be either an array (where each item is the height of the row at that index) or a Map of row index to height.</p>\n<p>These values are used in place of <code>defaultRowHeight</code> until rows are rendered and measured,\nso providing them can make server-rendered lists and initial scroll positions more accurate.</p>\n<p>ℹ️ This value is only read when the hook first mounts and when the <code>key</code> changes.</p>\n</td>\n    </tr>\n    <tr>\n      <td>key?</td>\n      <td><p>Changing this value clears all measured row heights,\ne.g. when the list renders a different set of data.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n### useGridCallbackRef\n\nConvenience hook to return a properly typed ref callback for the Grid component.\n\nUse this hook when you need to share the ref with another component or hook.\n\n### useGridRef\n\nConvenience hook to return a properly typed ref for the Grid component.\n\n### useIsScrolling\n\nTracks whether an element (or the window) is currently scrolling,\ne.g. to render simplified content in place of rows that are expensive to render.\n\nPass the element that scrolls:\n- a list or grid's own element (e.g. from `useListCallbackRef`)\n- \"window\" or the scroll element, for lists and grids that use the `scrollElement` prop\n\nScrolling ends when the browser fires a \"scrollend\" event or,\nin browsers that don't support that event, after no scroll events have been received for `delay` milliseconds.\n\nℹ️ Scrolling that starts and ends before React renders (e.g. an instant scroll) may not change this value.\n\n⚠️ Changing this value re-renders any rows it is passed to (e.g. via `rowProps`) when scrolling starts and when it ends.\n\n#### Parameters\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>target</td>\n      <td></td>\n    </tr>\n    <tr>\n      <td>delay?</td>\n      <td><p>Milliseconds without scroll events after which scrolling is considered to have ended\n(only used by browsers that don&#39;t support the &quot;scrollend&quot; event); defaults to 150.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n### useListCallbackRef\n\nConvenience hook to return a properly typed ref callback for the List component.\n\nUse this hook when you need to share the ref with another component or hook.\n\n### useListRef\n\nConvenience hook to return a properly typed ref for the List component.\n\n### useVirtualizer\n\nCalculates which items to render, and where, for custom (headless) virtualized content\n(e.g. a `<table>` or a custom layout).\n\nThe returned items are positioned relative to the start of the element's content;\nhow they are rendered (e.g. absolute positioning or spacer elements) is up to the caller.\n\n#### Parameters\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>count</td>\n      <td><p>Number of items.</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultScrollOffset?</td>\n      <td><p>Initial scroll offset (in pixels), applied once when the element first mounts with at least one item.</p>\n<p>ℹ️ Ignored when a <code>scrollElement</code> is specified.</p>\n</td>\n    </tr>\n    <tr>\n      <td>defaultSize?</td>\n      <td><p>Size (in pixels) of the viewport before it has been measured (e.g. during server rendering);\nthis determines how many items are initially rendered.</p>\n</td>\n    </tr>\n    <tr>\n      <td>dir?</td>\n      <td><p>Direction of horizontal content; detected from the element (or its ancestors) by default.</p>\n</td>\n    </tr>\n    <tr>\n      <td>direction?</td>\n      <td><p>Direction that items are laid out in; defaults to &quot;vertical&quot;.</p>\n</td>\n    </tr>\n    <tr>\n      <td>element</td>\n      <td><p>Element that scrolls the items or, if a <code>scrollElement</code> is specified, the element that contains the items.</p>\n<p>ℹ️ Item offsets are relative to the start of this element&#39;s content.</p>\n</td>\n    </tr>\n    <tr>\n      <td>itemSize</td>\n      <td><p>Item size; the following formats are supported:</p>\n<ul>\n<li>number of pixels (number)</li>\n<li>percentage of the viewport&#39;s size (string)</li>\n<li>function that returns the item size (in pixels) given an index</li>\n<li>dynamic row height cache returned by the <code>useDynamicRowHeight</code> hook (vertical only);\nrendered items must be passed to <code>measureElement</code> and specify a <code>data-index</code> attribute</li>\n</ul>\n<p>ℹ️ Sizes are cached until the value of this option changes;\nmemoize functions (e.g. with <code>useCallback</code>) and only change them when sizes change.</p>\n</td>\n    </tr>\n    <tr>\n      <td>onItemsRendered?</td>\n      <td><p>Callback notified when the range of visible (or rendered) items changes.</p>\n</td>\n    </tr>\n    <tr>\n      <td>overscanCount?</td>\n      <td><p>How many additional items to render outside of the visible area; defaults to 3.</p>\n</td>\n    </tr>\n    <tr>\n      <td>scrollElement?</td>\n      <td><p>Element that scrolls the items, for items that scroll along with other content (e.g. the page):</p>\n<ul>\n<li>&quot;window&quot; to scroll with the page</li>\n<li>an ancestor element that scrolls; <code>null</code> until it has mounted</li>\n</ul>\n<p>See the <code>scrollElement</code> prop of <code>List</code> for more information.</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n## Imperative APIs\n\n### GridImperativeAPI\n\nRef used to interact with this component's imperative API.\nThis API has imperative methods for scrolling and a getter for the outermost DOM element.\n\nℹ️ The `useGridRef` and `useGridCallbackRef` hooks are exported for convenience in TypeScript projects.\n\n#### Methods\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>scrollToCell</td>\n      <td><p>Scrolls the grid so that the specified row and column are visible.\nLike the browser&#39;s <code>scrollIntoView</code>, items are aligned within the CSS <code>scroll-padding</code> of the element being scrolled\n(e.g. <code>scroll-padding-top</code> can leave room for a sticky header).</p>\n<ul>\n<li><code>behavior</code> Determines whether scrolling is instant or animates smoothly</li>\n<li><code>columnAlign</code> Determines the horizontal alignment of the element within the grid</li>\n<li><code>columnIndex</code> Index of the column to scroll to (0-based)</li>\n<li><code>rowAlign</code> Determines the vertical alignment of the element within the grid</li>\n<li><code>rowIndex</code> Index of the row to scroll to (0-based)</li>\n</ul>\n</td>\n    </tr>\n    <tr>\n      <td>scrollToColumn</td>\n      <td><p>Scrolls the grid so that the specified column is visible.\nLike the browser&#39;s <code>scrollIntoView</code>, items are aligned within the CSS <code>scroll-padding</code> of the element being scrolled\n(e.g. <code>scroll-padding-top</code> can leave room for a sticky header).</p>\n<ul>\n<li><code>align</code> Determines the horizontal alignment of the element within the grid</li>\n<li><code>behavior</code> Determines whether scrolling is instant or animates smoothly</li>\n<li><code>index</code> Index of the column to scroll to (0-based)</li>\n</ul>\n</td>\n    </tr>\n    <tr>\n      <td>scrollToRow</td>\n      <td><p>Scrolls the grid so that the specified row is visible.\nLike the browser&#39;s <code>scrollIntoView</code>, items are aligned within the CSS <code>scroll-padding</code> of the element being scrolled\n(e.g. <code>scroll-padding-top</code> can leave room for a sticky header).</p>\n<ul>\n<li><code>align</code> Determines the vertical alignment of the element within the grid</li>\n<li><code>behavior</code> Determines whether scrolling is instant or animates smoothly</li>\n<li><code>index</code> Index of the row to scroll to (0-based)</li>\n</ul>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n### ListImperativeAPI\n\nImperative List API.\n\nℹ️ The `useListRef` and `useListCallbackRef` hooks are exported for convenience in TypeScript projects.\n\n#### Methods\n\n<table>\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>scrollToRow</td>\n      <td><p>Scrolls the list so that the specified row is visible.\nLike the browser&#39;s <code>scrollIntoView</code>, items are aligned within the CSS <code>scroll-padding</code> of the element being scrolled\n(e.g. <code>scroll-padding-top</code> can leave room for a sticky header).\nDynamic row heights are measured after rendering;\nContent that resizes later may require another scrollToRow call.</p>\n<p>ℹ️ For dynamic height lists, &quot;smooth&quot; scrolling is animated by the list (rather than the browser)\nso that the destination can be corrected as rows are measured along the way.</p>\n<ul>\n<li><code>align</code> Determines the vertical alignment of the element within the list</li>\n<li><code>behavior</code> Determines whether scrolling is instant or animates smoothly</li>\n<li><code>index</code> Index of the row to scroll to (0-based)</li>\n</ul>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n<!-- react-lib-tools:api:end -->","publish_time":1795279590532,"_cnpm_publish_time":1795279590532,"dist-tags":{"alpha":"2.2.5-alpha.1","latest":"2.5.4","next":"1.6.0-alpha.1","rc":"1.0.0"}}