@reach-ui-fork/window-size
TypeScript icon, indicating that this package has built-in type declarations

0.18.1 • Public • Published

@reach-ui-fork/window-size

Stable release MIT license

Docs | Source

Measure the current window dimensions.

import WindowSize, { useWindowSize } from "@reach-ui-fork/window-size";

function Example() {
	const { width, height } = useWindowSize();
	return (
		<div>
			<p>
				Looks like a pretty{" "}
				{width <= 400 ? "small" : width >= 1000 ? "large" : "normal"} screen!
			</p>
		</div>
	);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @reach-ui-fork/window-size

Weekly Downloads

0

Version

0.18.1

License

MIT

Unpacked Size

13.1 kB

Total Files

10

Last publish

Collaborators

  • yozi