@acusti/use-is-out-of-bounds
Version:
React hook that detects if an element is outside of its parent’s bounds on any of its sides (like collision detection)
52 lines (51 loc) • 1.5 kB
JSON
{
"name": "@acusti/use-is-out-of-bounds",
"version": "0.13.0",
"type": "module",
"sideEffects": false,
"exports": "./dist/useIsOutOfBounds.js",
"main": "./dist/useIsOutOfBounds.js",
"types": "./dist/useIsOutOfBounds.d.ts",
"files": [
"dist",
"src"
],
"description": "React hook that detects if an element is outside of its parent’s bounds on any of its sides (like collision detection)",
"keywords": [
"react",
"react-hooks",
"hooks",
"bounds",
"out-of-bounds",
"collision-detection",
"overflow",
"typescript",
"ts",
"flow"
],
"repository": {
"type": "git",
"url": "https://github.com/acusti/uikit.git",
"directory": "packages/use-is-out-of-bounds"
},
"author": "andrew patton <andrew@acusti.ca> (https://www.acusti.ca)",
"license": "Unlicense",
"bugs": {
"url": "https://github.com/acusti/uikit/issues"
},
"homepage": "https://github.com/acusti/uikit/tree/main/packages/use-is-out-of-bounds#readme",
"devDependencies": {
"@types/react": "^19.0.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "5.3.3",
"vitest": "^2.1.8"
},
"dependencies": {
"@acusti/use-bounding-client-rect": "^1.4.0"
},
"peerDependencies": {
"react": "^16.8 || ^17 || ^18 || ^19",
"react-dom": "^16.8 || ^17 || ^18 || ^19"
}
}