ipsased
Version:
UI toolkit monorepo containing a React component library, UI utilities, a drag-and-drop library, and more
12 lines (9 loc) • 989 B
Markdown
# @acusti/use-bounding-client-rect
[](https://www.npmjs.com/package/@acusti/use-bounding-client-rect)
[](https://npms.io/search?q=%40acusti%2Fuse-bounding-client-rect)
[](https://bundlephobia.com/package/@acusti/use-bounding-client-rect)
[](https://www.npmjs.com/package/@acusti/use-bounding-client-rect)
`useBoundingClientRect` is a React hook that returns the
`boundingClientRect` for the passed in HTMLElement and uses
`ResizeObserver` to update the return value and trigger a new render when
the HTMLElement’s `boundingClientRect` changes.