Détail du package

@acusti/use-is-out-of-bounds

acusti618Unlicense0.14.0

React hook that detects if an element is outside of its parent’s bounds on any of its sides (like collision detection)

react, react-hooks, hooks, bounds

readme

@acusti/use-is-out-of-bounds

latest version maintenance status downloads per month bundle size

useIsOutOfBounds is a React hook that returns a { bottom: boolean, left: boolean, right: boolean, top: boolean, hasLayout: boolean } object for the passed-in element. The hasLayout value represents whether the element has been laid out yet (i.e. if the browser has computed the reflow), while the side values indicate whether an element is outside of its parent’s bounds on that side.