A hook that returns the current window dimensions.
widthnumberheightnumber| Prop | Type | Default |
|---|---|---|
width | number | - |
height | number | - |
import { useWindowSize } from '@k8ordo/ui';const { width, height } = useWindowSize();
return (
<div>
<span>Width: {width}px</span>
<span>Height: {height}px</span>
</div>
);