{"_id":"@buildinams/use-window-size","_rev":"4-07ab1e5ae527f3bb750c724584f08b54","name":"@buildinams/use-window-size","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@buildinams/use-window-size","version":"0.0.1","keywords":["react","hooks","hook","resize","bounds","react-hook","window-size"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/use-window-size@0.0.1","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/use-window-size#readme","bugs":{"url":"https://github.com/buildinamsterdam/use-window-size/issues"},"dist":{"shasum":"45eef2708c01a74899a21248413623888d9aad7c","tarball":"https://registry.npmjs.org/@buildinams/use-window-size/-/use-window-size-0.0.1.tgz","fileCount":27,"integrity":"sha512-fSyKUFEvyjdkAi8KkYo8Rd/1WijJPttYkfVReVK8QGVlkDrKD2wD9r6917qwuTr99H+GiMT8+ut8Yntz9piwHQ==","signatures":[{"sig":"MEYCIQDMuHCHcwyH3k++rrL1YiT2TIwtECZUk8sKr/BCYoVUmQIhAKGH4jLlNT9sqUfRgywRUDMk3ZQItuW7LiJF8XtDYYmL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3PjWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIqQ/+I+eKsry/jwoD8FBMt7AO/NHkK1r4nE29C38yyaaoDzN6CZQf\r\n3keg4orhdik6h9MBFNAkmzfgsPaG0kqFxusEmNiyV1BQaZlRHPTIC/gmcJ6d\r\ntoBryXLp0Hi5bE+n9U10PNqYgymte5KNaD2lB3xv2FFo1nnWom5vpG8aLLTd\r\nxW7yZPttO+WFkn5ITBufKiGyQn8tDLBXKQNEts/o5eTDKWv8pWLutavvdn0r\r\nC5L5iVAM69ETh4g4e+lXY5aDMleheAPAiiaYit0kWZlmwVAOXxu+J708N9YI\r\npaVndWrhAWuDz3X+AM/AK4I96hEB42zidnDyEfD2SF+1npccTVEhZIUrpSvw\r\nIhePHrL/Taie2kEI9fHhj+eRWQpS4u7ZLRfZ6VUIjwkX7yTfjdMbdp4ns3HH\r\naZ4UJOSJi6hBHrsce1A9ZoufC64X/AfbvkqRPEbXO5YgJQRXPrY+peGvlRZC\r\nEWjWM9OkvfpADYQHOczXtyjNj+P2oi+O7qYLhL0W20HCUfYMiEqN1QF4uOhN\r\n8TnZZ2zdraTfjy9kT9TqYxP6NJ1u5TgDIJVdEm/X5NvlAmVVRxZPki8ip0p5\r\nGXQBknMHn9HRDa0RekZy6eht9e54nsVSZ1U3J45NrA0w9FHv3BXHtgtVzRgW\r\nJgSAsThUy6zEcm+FjngMYKvIcpU0t+Tu6XI=\r\n=Ki23\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"8c5a2e76b3896a8e85abcb1951b6f9fb6ca7ec8a","scripts":{"fix":"npm-run-all --sequential fix:*","lint":"NODE_ENV=test npm-run-all --parallel lint:*","test":"jest","build":"tsc","fix:js":"eslint \"src/**/*.{ts,tsx}\" --fix","coverage":"jest --coverage","depcheck":"npx npm-check --update","fix:format":"prettier \"**/*.{md,yml}\" --write","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","lint:format":"prettier \"**/*.{md,yml}\" --check","lint:script":"eslint \"src/**/*.{ts,tsx}\"","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/use-window-size.git","type":"git"},"_npmVersion":"8.19.3","description":"Hook to get the viewport bounds (width and height)","directories":{},"_nodeVersion":"18.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","prettier":"^2.8.2","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.0.4","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/use-window-size_0.0.1_1675426006347_0.28800133250864923","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-02-03T12:06:46.260Z","modified":"2025-12-19T15:31:16.934Z","0.0.1":"2023-02-03T12:06:46.485Z"},"bugs":{"url":"https://github.com/buildinamsterdam/use-window-size/issues"},"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","homepage":"https://github.com/buildinamsterdam/use-window-size#readme","keywords":["react","hooks","hook","resize","bounds","react-hook","window-size"],"repository":{"url":"git+https://github.com/buildinamsterdam/use-window-size.git","type":"git"},"description":"Hook to get the viewport bounds (width and height)","maintainers":[{"email":"maikel@buildinamsterdam.com","name":"buildinamsterdam"},{"email":"bruno@buildinamsterdam.com","name":"_brunotome_"},{"email":"folkert-jan@buildinamsterdam.com","name":"folkertjan"},{"email":"maarten@obelism.studio","name":"maartenbruggink"}],"readme":"# use-window-size\n\n[![NPM version][npm-image]][npm-url]\n[![Actions Status][ci-image]][ci-url]\n[![PR Welcome][npm-downloads-image]][npm-downloads-url]\n\nHook to get the viewport bounds (width and height).\n\n## Introduction\n\nThis hook optimizes window resize event handling by:\n\n- Only initializing a single event listener for all instance of the hook used.\n- Throttling how often the event resize handler fires (Max `200ms` between calls).\n\nThis library is also SSR safe, and only runs on the client.\n\n## Installation\n\nInstall this package with `npm`.\n\n```bash\nnpm i @buildinams/use-window-size\n```\n\n## Usage\n\nTo use this hook, simply import it and use it like a normal React hook.\n\n```tsx\nimport useWindowSize from \"@buildinams/use-window-size\";\n\nconst { width, height } = useWindowSize();\n```\n\n## API\n\nOn first render this hooks returns `0` for both window width and height and then returns window width and height once is mounted.\n\n## Requirements\n\nThis library requires a minimum React version of `17.0.0`.\n\n## Requests and Contributing\n\nFound an issue? Want a new feature? Get involved! Please contribute using our guideline [here](https://github.com/buildinamsterdam/use-window-size/blob/main/CONTRIBUTING.md).\n\n[npm-image]: https://img.shields.io/npm/v/@buildinams/use-window-size.svg?style=flat-square&logo=react\n[npm-url]: https://npmjs.org/package/@buildinams/use-window-size\n[ci-image]: https://github.com/buildinamsterdam/use-window-size/actions/workflows/test.yml/badge.svg\n[ci-url]: https://github.com/buildinamsterdam/use-window-size/actions\n[npm-downloads-image]: https://img.shields.io/npm/dm/@buildinams/use-window-size.svg\n[npm-downloads-url]: https://npmcharts.com/compare/@buildinams/use-window-size?minimal=true\n","readmeFilename":"README.md"}