{"_id":"@rc-component/resize-observer","_rev":"4537621","name":"@rc-component/resize-observer","description":"Resize observer for React","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"time":{"modified":"2026-04-09T15:01:56.000Z","created":"2025-01-23T03:58:59.979Z","1.1.2":"2026-03-24T09:44:59.256Z","1.1.1":"2026-01-15T07:08:36.217Z","1.1.0":"2026-01-15T06:53:47.454Z","1.0.1":"2025-11-26T03:58:52.494Z","1.0.0":"2025-01-23T03:58:59.979Z"},"users":{},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/resize-observer.git"},"versions":{"1.1.2":{"name":"@rc-component/resize-observer","version":"1.1.2","description":"Resize observer for React","keywords":["react","react-component","react-resize-observer","resize-observer"],"main":"./lib/index","module":"./es/index","homepage":"https://react-component.github.io/resize-observer","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/resize-observer.git"},"bugs":{"url":"http://github.com/react-component/resize-observer/issues"},"license":"MIT","scripts":{"start":"dumi dev","build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","deploy":"UMI_ENV=gh npm run build && gh-pages -d dist","gh-pages":"npm run deploy","prepare":"dumi setup","prepublishOnly":"npm run compile && rc-np","postpublish":"npm run gh-pages","lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","test":"rc-test","coverage":"rc-test --coverage","now-build":"npm run build"},"dependencies":{"@rc-component/util":"^1.2.0"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@rc-component/np":"^1.0.0","@testing-library/react":"^12.1.5","@types/jest":"^29.5.10","@types/node":"^24.5.2","@types/react":"^18.0.28","@types/react-dom":"^18.0.11","@umijs/fabric":"^4.0.0","cheerio":"1.0.0-rc.12","coveralls":"^3.0.6","cross-env":"^7.0.2","dumi":"^2.0.0","enzyme":"^3.0.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.4.0","father":"^4.0.0","gh-pages":"^6.1.0","glob":"^7.1.6","less":"^4.1.3","prettier":"^3.2.5","pretty-quick":"^4.0.0","rc-test":"^7.0.15","react":"^16.0.0","react-dom":"^16.0.0","regenerator-runtime":"^0.14.0","eslint":"8.x"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"resolutions":{"@types/minimatch":"5.1.2"},"cnpm":{"mode":"npm"},"tnpm":{"mode":"npm"},"gitHead":"084d6927e1f3cbae6b96f16be7ca30b50c1bb964","types":"./lib/index.d.ts","_id":"@rc-component/resize-observer@1.1.2","_nodeVersion":"22.15.1","_npmVersion":"11.7.0","dist":{"shasum":"5897e65d7fed5c6e768dcfd8bdec181a3309a98f","size":8290,"noattachment":false,"key":"/@rc-component/resize-observer/-/@rc-component/resize-observer-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/resize-observer/download/@rc-component/resize-observer-1.1.2.tgz"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"directories":{},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resize-observer_1.1.2_1774345499136_0.36548842900771383"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-24T09:44:59.256Z","publish_time":1774345499256,"_source_registry_name":"default","_cnpm_publish_time":1774345499256},"1.1.1":{"name":"@rc-component/resize-observer","version":"1.1.1","description":"Resize observer for React","keywords":["react","react-component","react-resize-observer","resize-observer"],"main":"./lib/index","module":"./es/index","homepage":"https://react-component.github.io/resize-observer","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/resize-observer.git"},"bugs":{"url":"http://github.com/react-component/resize-observer/issues"},"license":"MIT","scripts":{"start":"dumi dev","build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","deploy":"UMI_ENV=gh npm run build && gh-pages -d dist","gh-pages":"npm run deploy","prepare":"dumi setup","prepublishOnly":"npm run compile && rc-np","postpublish":"npm run gh-pages","lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","test":"rc-test","coverage":"rc-test --coverage","now-build":"npm run build"},"dependencies":{"@rc-component/util":"^1.2.0"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@rc-component/np":"^1.0.0","@testing-library/react":"^12.1.5","@types/jest":"^29.5.10","@types/node":"^24.5.2","@types/react":"^18.0.28","@types/react-dom":"^18.0.11","@umijs/fabric":"^4.0.0","cheerio":"1.0.0-rc.12","coveralls":"^3.0.6","cross-env":"^7.0.2","dumi":"^2.0.0","enzyme":"^3.0.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.4.0","father":"^4.0.0","gh-pages":"^6.1.0","glob":"^7.1.6","less":"^4.1.3","prettier":"^3.2.5","pretty-quick":"^4.0.0","rc-test":"^7.0.15","react":"^16.0.0","react-dom":"^16.0.0","regenerator-runtime":"^0.14.0","eslint":"8.x"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"resolutions":{"@types/minimatch":"5.1.2"},"cnpm":{"mode":"npm"},"tnpm":{"mode":"npm"},"gitHead":"7ae38d2d69840c9294ad6e794936d92ad19b1d6a","types":"./lib/index.d.ts","_id":"@rc-component/resize-observer@1.1.1","_nodeVersion":"22.15.1","_npmVersion":"11.7.0","dist":{"shasum":"216d7edb5259bb7d2a732735f0a103328ac8ad80","size":8211,"noattachment":false,"key":"/@rc-component/resize-observer/-/@rc-component/resize-observer-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/resize-observer/download/@rc-component/resize-observer-1.1.1.tgz"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"directories":{},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resize-observer_1.1.1_1768460916066_0.1455620969602458"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-15T07:08:36.217Z","publish_time":1768460916217,"_source_registry_name":"default","_cnpm_publish_time":1768460916217},"1.1.0":{"name":"@rc-component/resize-observer","version":"1.1.0","description":"Resize observer for React","keywords":["react","react-component","react-resize-observer","resize-observer"],"main":"./lib/index","module":"./es/index","homepage":"https://react-component.github.io/resize-observer","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/resize-observer.git"},"bugs":{"url":"http://github.com/react-component/resize-observer/issues"},"license":"MIT","scripts":{"start":"dumi dev","build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","deploy":"UMI_ENV=gh npm run build && gh-pages -d dist","gh-pages":"npm run deploy","prepare":"dumi setup","prepublishOnly":"npm run compile && rc-np","postpublish":"npm run gh-pages","lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","test":"rc-test","coverage":"rc-test --coverage","now-build":"npm run build"},"dependencies":{"@rc-component/util":"^1.2.0"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@rc-component/np":"^1.0.0","@testing-library/react":"^12.1.5","@types/jest":"^29.5.10","@types/node":"^24.5.2","@types/react":"^18.0.28","@types/react-dom":"^18.0.11","@umijs/fabric":"^4.0.0","cheerio":"1.0.0-rc.12","coveralls":"^3.0.6","cross-env":"^7.0.2","dumi":"^2.0.0","enzyme":"^3.0.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.4.0","father":"^4.0.0","gh-pages":"^6.1.0","glob":"^7.1.6","less":"^4.1.3","prettier":"^3.2.5","pretty-quick":"^4.0.0","rc-test":"^7.0.15","react":"^16.0.0","react-dom":"^16.0.0","regenerator-runtime":"^0.14.0","eslint":"8.x"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"resolutions":{"@types/minimatch":"5.1.2"},"cnpm":{"mode":"npm"},"tnpm":{"mode":"npm"},"gitHead":"2d3833c4d59407ee1a8a3fcfa164d02ab3e5d996","types":"./lib/index.d.ts","_id":"@rc-component/resize-observer@1.1.0","_nodeVersion":"22.15.1","_npmVersion":"11.7.0","dist":{"shasum":"e3e4a62574159cc3c4b180eb50d8ed4747d8dd08","size":8158,"noattachment":false,"key":"/@rc-component/resize-observer/-/@rc-component/resize-observer-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/resize-observer/download/@rc-component/resize-observer-1.1.0.tgz"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"directories":{},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resize-observer_1.1.0_1768460027307_0.7426453470965682"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-15T06:53:47.454Z","publish_time":1768460027454,"_source_registry_name":"default","_cnpm_publish_time":1768460027454},"1.0.1":{"name":"@rc-component/resize-observer","version":"1.0.1","description":"Resize observer for React","keywords":["react","react-component","react-resize-observer","resize-observer"],"main":"./lib/index","module":"./es/index","homepage":"https://react-component.github.io/resize-observer","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/resize-observer.git"},"bugs":{"url":"http://github.com/react-component/resize-observer/issues"},"license":"MIT","scripts":{"start":"dumi dev","build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","deploy":"UMI_ENV=gh npm run build && gh-pages -d dist","gh-pages":"npm run deploy","prepare":"dumi setup","prepublishOnly":"npm run compile && rc-np","postpublish":"npm run gh-pages","lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","test":"rc-test","coverage":"rc-test --coverage","now-build":"npm run build"},"dependencies":{"@rc-component/util":"^1.2.0"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@rc-component/np":"^1.0.0","@testing-library/react":"^12.1.5","@types/jest":"^29.5.10","@types/node":"^24.5.2","@types/react":"^18.0.28","@types/react-dom":"^18.0.11","@umijs/fabric":"^2.0.9","cheerio":"1.0.0-rc.12","coveralls":"^3.0.6","cross-env":"^7.0.2","dumi":"^2.0.0","enzyme":"^3.0.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.4.0","father":"^4.0.0","gh-pages":"^6.1.0","glob":"^7.1.6","less":"^4.1.3","prettier":"^3.2.5","pretty-quick":"^4.0.0","rc-test":"^7.0.15","react":"^16.0.0","react-dom":"^16.0.0","regenerator-runtime":"^0.14.0"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"resolutions":{"@types/minimatch":"5.1.2"},"cnpm":{"mode":"npm"},"tnpm":{"mode":"npm"},"_id":"@rc-component/resize-observer@1.0.1","gitHead":"709f18d11115c4dbdd2edbdca88b2f9bc92855e0","types":"./lib/index.d.ts","_nodeVersion":"22.8.0","_npmVersion":"11.6.0","dist":{"shasum":"bd07c2ab29baa019bd83a0870c07f6902d2241a3","size":7541,"noattachment":false,"key":"/@rc-component/resize-observer/-/@rc-component/resize-observer-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/resize-observer/download/@rc-component/resize-observer-1.0.1.tgz"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"directories":{},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resize-observer_1.0.1_1764129532301_0.0806058646158414"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-11-26T03:58:52.494Z","publish_time":1764129532494,"_source_registry_name":"default","_cnpm_publish_time":1764129532494},"1.0.0":{"name":"@rc-component/resize-observer","version":"1.0.0","description":"Resize observer for React","keywords":["react","react-component","react-resize-observer","resize-observer"],"main":"./lib/index","module":"./es/index","homepage":"https://react-component.github.io/resize-observer","repository":{"type":"git","url":"git+ssh://git@github.com/react-component/resize-observer.git"},"bugs":{"url":"http://github.com/react-component/resize-observer/issues"},"license":"MIT","scripts":{"start":"dumi dev","build":"dumi build","compile":"father build && lessc assets/index.less assets/index.css","deploy":"UMI_ENV=gh npm run build && gh-pages -d dist","gh-pages":"npm run deploy","prepare":"dumi setup","prepublishOnly":"npm run compile && rc-np","postpublish":"npm run gh-pages","lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","test":"rc-test","coverage":"rc-test --coverage","now-build":"npm run build"},"dependencies":{"classnames":"^2.2.1","@rc-component/util":"^1.2.0"},"devDependencies":{"@rc-component/father-plugin":"^2.0.2","@testing-library/react":"^12.1.5","@types/jest":"^29.5.10","@types/react-dom":"^18.0.11","@types/react":"^18.0.28","@umijs/fabric":"^2.0.9","coveralls":"^3.0.6","cross-env":"^7.0.2","dumi":"^2.0.0","enzyme":"^3.0.0","enzyme-adapter-react-16":"^1.15.6","enzyme-to-json":"^3.4.0","father":"^4.0.0","gh-pages":"^6.1.0","glob":"^7.1.6","less":"^4.1.3","@rc-component/np":"^1.0.0","prettier":"^3.2.5","pretty-quick":"^4.0.0","rc-test":"^7.0.15","react":"^16.0.0","react-dom":"^16.0.0","cheerio":"1.0.0-rc.12","regenerator-runtime":"^0.14.0"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"cnpm":{"mode":"npm"},"tnpm":{"mode":"npm"},"_id":"@rc-component/resize-observer@1.0.0","gitHead":"42c60bf21798fc3d8c65592ec5e6af1a1c6e56cb","types":"./lib/index.d.ts","_nodeVersion":"22.5.1","_npmVersion":"10.8.2","dist":{"shasum":"93486fc12e95318eddd2d4e7a863b274e5a2a44f","size":7446,"noattachment":false,"key":"/@rc-component/resize-observer/-/@rc-component/resize-observer-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@rc-component/resize-observer/download/@rc-component/resize-observer-1.0.0.tgz"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"directories":{},"maintainers":[{"name":"afc163","email":""},{"name":"chenshuai2144","email":""},{"name":"madccc","email":""},{"name":"peachscript","email":""},{"name":"zombiej","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/resize-observer_1.0.0_1737604739806_0.00999835182572606"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-23T03:58:59.979Z","publish_time":1737604739979,"_source_registry_name":"default","_cnpm_publish_time":1737604739979}},"readme":"# rc-resize-observer\n\n[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-resize-observer.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-resize-observer\n[github-actions-image]: https://github.com/react-component/resize-observer/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/resize-observer/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/resize-observer/master.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/react-component/resize-observer/branch/master\n[download-image]: https://img.shields.io/npm/dm/rc-resize-observer.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-resize-observer\n\nResize observer for React.\n\n## Live Demo\n\nhttps://resize-observer-react-component.vercel.app/\n\n## Install\n\n[![rc-resize-observer](https://nodei.co/npm/rc-resize-observer.png)](https://npmjs.org/package/rc-resize-observer)\n\n## Usage\n\n```js\nimport ResizeObserver from 'rc-resize-observer';\nimport { render } from 'react-dom';\n\nrender(\n  <ResizeObserver\n    onResize={() => {\n      console.log('resized!');\n    }}\n  >\n    <textarea />\n  </ResizeObserver>,\n  mountNode,\n);\n```\n\n## API\n\n| Property | Type                        | Default | Description                     |\n| -------- | --------------------------- | ------- | ------------------------------- |\n| disabled | boolean                     | false   |                                 |\n| onResize | ({ width, height }) => void | -       | Trigger when child node resized |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## License\n\nrc-resize-observer is released under the MIT license.\n","_attachments":{},"homepage":"https://react-component.github.io/resize-observer","bugs":{"url":"http://github.com/react-component/resize-observer/issues"},"license":"MIT"}