@reach/rect
Measure React elements position in the DOM
Last updated 5 years ago by chancestrickland .
MIT · Repository · Original npm · Tarball · package.json
$ npm install @reach/rect 
SYNC missed versions from official npm registry.

@reach/rect

Stable release MIT license

Docs | Source

Measures DOM elements (aka. bounding client rect). See also Element.getBoundingClientRect()

import { Rect, useRect } from "@reach/rect";

function Example() {
	const ref = React.useRef();
	const rect = useRect(ref);

	return (
		<div>
			<pre>{JSON.stringify(rect, null, 2)}</pre>
			<div
				ref={ref}
				contentEditable
				dangerouslySetInnerHTML={{
					__html: "Edit this to change the size!",
				}}
			/>
		</div>
	);
}

Current Tags

  • 0.18.0                                ...           latest (2 years ago)
  • 0.4.0-beta.0                                ...           next (5 years ago)
  • 0.18.0-pre.5                                ...           pre (2 years ago)

50 Versions

  • 0.18.0                                ...           2 years ago
  • 0.18.0-pre.5                                ...           2 years ago
  • 0.18.0-pre.4                                ...           2 years ago
  • 0.18.0-pre.3                                ...           2 years ago
  • 0.18.0-pre.2                                ...           2 years ago
  • 0.18.0-pre.1                                ...           2 years ago
  • 0.18.0-pre.0                                ...           2 years ago
  • 0.17.0                                ...           3 years ago
  • 0.16.0                                ...           3 years ago
  • 0.15.3                                ...           3 years ago
  • 0.15.2                                ...           3 years ago
  • 0.15.0                                ...           4 years ago
  • 0.14.0                                ...           4 years ago
  • 0.13.2                                ...           4 years ago
  • 0.13.1                                ...           4 years ago
  • 0.13.0                                ...           4 years ago
  • 0.12.1                                ...           4 years ago
  • 0.12.0                                ...           4 years ago
  • 0.11.2                                ...           4 years ago
  • 0.11.1                                ...           4 years ago
  • 0.11.0                                ...           4 years ago
  • 0.10.5                                ...           4 years ago
  • 0.10.4                                ...           4 years ago
  • 0.10.3                                ...           4 years ago
  • 0.10.2                                ...           5 years ago
  • 0.10.1                                ...           5 years ago
  • 0.10.0                                ...           5 years ago
  • 0.9.0                                ...           5 years ago
  • 0.8.6                                ...           5 years ago
  • 0.8.2                                ...           5 years ago
  • 0.8.0                                ...           5 years ago
  • 0.7.4                                ...           5 years ago
  • 0.7.3                                ...           5 years ago
  • 0.7.2                                ...           5 years ago
  • 0.7.1                                ...           5 years ago
  • 0.7.0                                ...           5 years ago
  • 0.6.2                                ...           5 years ago
  • 0.6.1                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.4.0-beta.0                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.3.0-alpha.0                                ...           5 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE