{"name":"react-virtualized-auto-sizer","version":"2.0.1","keywords":["react","reactjs","virtual","window","windowed","list","scrolling","infinite","virtualized","table","grid","spreadsheet"],"author":{"url":"https://github.com/bvaughn/","name":"Brian Vaughn","email":"brian.david.vaughn@gmail.com"},"license":"MIT","_id":"react-virtualized-auto-sizer@2.0.1","maintainers":[{"name":"brianvaughn","email":"briandavidvaughn@gmail.com"}],"contributors":[{"url":"https://github.com/bvaughn/","name":"Brian Vaughn","email":"brian.david.vaughn@gmail.com"}],"homepage":"http://react-virtualized-auto-sizer.now.sh/","bugs":{"url":"https://github.com/bvaughn/react-virtualized-auto-sizer/issues"},"dist":{"shasum":"4b1dda6a0f32d333824fe2de07604c97c28a0ced","tarball":"http://registry-npm.ywwl.com/react-virtualized-auto-sizer/download/react-virtualized-auto-sizer-2.0.1.tgz","fileCount":8,"integrity":"sha512-7xaqssJeCtXCETeRDxPUXKpUFjCrhK60o8X02BJF7zcTfjwKfdSQmb2fVDLIwaO8RmmzaGL1glJUQ+/b236Y1A==","signatures":[{"sig":"MEYCIQDmLvPd8xuVSCI2s2woeSUlLUWlQRqUJv/Ovxwy2E5IDAIhAJbI0O/xlxxhlXd5hAwj5Ws+hga1xvH8SW3rFzl+iJur","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80271,"size":18987,"noattachment":false,"key":"/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-2.0.1.tgz"},"main":"dist/react-virtualized-auto-sizer.cjs","type":"module","types":"dist/react-virtualized-auto-sizer.d.ts","module":"dist/react-virtualized-auto-sizer.js","gitHead":"70f363bcc0dc92d49d8380fb7c5b95b2a5cf15fb","scripts":{"dev":"vite","tsc":"tsc -b","lint":"eslint .","test":"vitest","build":"pnpm run build:lib && pnpm run build:docs","compile":"pnpm run compile:docs && pnpm run compile:examples","preview":"vite preview","test:ci":"vitest run","e2e:test":"pnpm -C integrations/vite/ run test","prettier":"prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"","build:lib":"TARGET=lib vite build","build:docs":"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/vite/ exec playwright install --with-deps","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 -C integrations/vite/ run dev"},"_npmUser":{"name":"brianvaughn","email":"briandavidvaughn@gmail.com"},"repository":{"url":"git+https://github.com/bvaughn/react-virtualized-auto-sizer.git","type":"git"},"_npmVersion":"11.4.2","description":"This package measures the available width and height of an `HTMLElement` and passes those values as props to a `Child` component. Refer to [the docs](https://react-virtualized-auto-sizer.vercel.app/examples/basic-usage) for usage examples.","directories":{},"lint-staged":{"**/*":"prettier --write --ignore-unknown"},"_nodeVersion":"24.3.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","clsx":"^2.1.1","sirv":"^3.0.2","vite":"^7.0.4","husky":"^9.1.7","jsdom":"^26.1.0","react":"^19.2.3","eslint":"^9.30.1","marked":"^16.4.1","terser":"^5.43.1","vitest":"^3.2.4","csstype":"^3.1.3","express":"^5.1.0","globals":"^16.3.0","postcss":"^8.5.6","ts-node":"^10.9.2","zustand":"^5.0.7","prettier":"3.6.2","react-dom":"^19.2.3","@eslint/js":"^9.30.1","typescript":"~5.8.3","@types/node":"^24.2.0","compression":"^1.8.1","lint-staged":"^16.1.4","markdown-it":"^14.1.0","tailwindcss":"^4.1.11","@types/react":"^19.1.8","@types/express":"^5.0.5","tailwind-merge":"^3.3.1","ts-blank-space":"^0.6.2","react-lib-tools":"^0.0.14","vite-plugin-dts":"^4.5.4","@heroicons/react":"^2.2.0","@lezer/highlight":"latest","@types/react-dom":"^19.2.3","react-router-dom":"^7.6.3","vite-plugin-svgr":"^4.3.0","@codemirror/state":"latest","@headlessui/react":"^2.2.4","@tailwindcss/vite":"^4.1.11","typescript-eslint":"^8.35.1","@types/compression":"^1.8.1","@types/markdown-it":"^14.1.2","@ts-ast-parser/core":"^0.8.0","@codemirror/lang-css":"latest","@codemirror/language":"latest","react-error-boundary":"^6.0.0","rollup-plugin-terser":"^7.0.2","@codemirror/lang-html":"latest","@tailwindplus/elements":"^1.0.5","@testing-library/react":"^16.3.0","typescript-json-schema":"^0.65.1","vitest-fail-on-console":"^0.10.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","@codemirror/lang-markdown":"latest","@testing-library/jest-dom":"^6.6.4","eslint-plugin-react-hooks":"^5.2.0","rollup-preserve-directives":"^1.1.3","@codemirror/lang-javascript":"latest","@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"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-virtualized-auto-sizer_2.0.1_1767108932108_0.7823220885121731","host":"s3://npm-registry-packages-npm-production"},"readme":"<img src=\"https://react-virtualized-auto-sizer.vercel.app/og.png\" alt=\"react-virtualized-auto-sizer logo\" width=\"400\" height=\"210\" />\n\n`react-virtualized-auto-sizer`: Measures the available width and height of an `HTMLElement` and passes those values as props to a `Child` component. Refer to [the docs](https://react-virtualized-auto-sizer.vercel.app/examples/basic-usage) for usage examples.\n\n> [!NOTE]\n> This package began as a fork of the `AutoSizer` component from [react-virtualized](https://github.com/bvaughn/react-virtualized), and was intended for use with earlier versions of [react-window](https://github.com/bvaughn/react-virtualized). More recent versions of `react-window` use `ResizeObserver` natively and do not require this package.\n\n### If you like this project, 🎉 [become a sponsor](https://github.com/sponsors/bvaughn/) or ☕ [buy me a coffee](http://givebrian.coffee/)\n\n## Install\n\n```bash\nnpm install --save react-virtualized-auto-sizer\n```\n\n## FAQs\n\nFrequently asked questions can be found [here](https://react-virtualized-auto-sizer.vercel.app/common-questions).\n\n## Documentation\n\n### AutoSizer\n\n<!-- AutoSizer:description:begin -->\nMeasures the available width and height of its parent `HTMLElement` and passes those values as `width` and `height` props to its `children`.\n\nℹ️ This component began as a fork of the [javascript-detect-element-resize](https://www.npmjs.com/package/javascript-detect-element-resize) package.\n<!-- AutoSizer:description:end -->\n\n#### Required props\n\n<!-- AutoSizer:required-props:begin -->\nNone\n<!-- AutoSizer:required-props:end -->\n\n#### Optional props\n\n<!-- AutoSizer:optional-props:begin -->\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>box</td>\n      <td><p>Corresponds to the <code>ResizeObserver</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe#box\">box</a> parameter.\nSets which box model the observer will observe changes to.</p>\n<ul>\n<li><code>border-box</code>: Size of the box border area as defined in CSS.</li>\n<li><code>content-box</code>: Size of the content area as defined in CSS.</li>\n<li><code>device-pixel-content-box</code>: The size of the content area as defined in CSS, in device pixels, before applying any CSS transforms on the element or its ancestors.</li>\n</ul>\n</td>\n    </tr>\n    <tr>\n      <td>className</td>\n      <td><p>Class name to be applied to the auto-sizer <code>HTMLElement</code>.</p>\n</td>\n    </tr>\n    <tr>\n      <td>data-testid</td>\n      <td><p>Test id attribute to interop with frameworks like <a href=\"https://testing-library.com/docs/queries/bytestid/\">Testing Library</a>.</p>\n</td>\n    </tr>\n    <tr>\n      <td>id</td>\n      <td><p>Unique id attribute to attach to root DOM element.</p>\n</td>\n    </tr>\n    <tr>\n      <td>nonce</td>\n      <td><p><a href=\"https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute\">Nonce</a> used for inline <code>StyleSheet</code>\nin browsers/environments that do not support the <code>ResizeObserver</code> API.</p>\n</td>\n    </tr>\n    <tr>\n      <td>onResize</td>\n      <td><p>Optional callback notified after a resize.\n@param size New width and height of parent element</p>\n</td>\n    </tr>\n    <tr>\n      <td>style</td>\n      <td><p>Style properties to be applied to the auto-sizer <code>HTMLElement</code>.</p>\n</td>\n    </tr>\n    <tr>\n      <td>tagName</td>\n      <td><p>Optional HTML tag name for root HTMLElement; defaults to <code>&quot;div&quot;</code>.</p>\n</td>\n    </tr>\n    <tr>\n      <td>Child</td>\n      <td><p>Child component to be passed the available width and height values as props.\n@deprecated Use the <code>ChildComponent</code> or <code>renderProp</code> props instead.</p>\n</td>\n    </tr>\n    <tr>\n      <td>ChildComponent</td>\n      <td><p>Child component to be passed the available width and height values as props.</p>\n<p>ℹ️ Use <code>renderProp</code> instead if you need access to local state.</p>\n<p>⚠️ Width and height are undefined during the during the initial render (including server-rendering).</p>\n</td>\n    </tr>\n    <tr>\n      <td>renderProp</td>\n      <td><p>Render prop to be passed the available width and height values as props.</p>\n<p>ℹ️ Use <code>ChildComponent</code> instead for better memoization if you do not need access to local state.</p>\n<p>⚠️ Width and height are undefined during the during the initial render (including server-rendering).</p>\n</td>\n    </tr>\n  </tbody>\n</table>\n\n<!-- AutoSizer:optional-props:end -->\n","publish_time":1767108932266,"_cnpm_publish_time":1767108932266,"dist-tags":{"latest":"2.0.4"}}