useWindowSize

useWindowSize keeps track of the window sizing height, width in the browser.

Window Size

Height: 0

Width: 0

Code for example above

import { useWindowSize } from "@talves/use-window-size";
export const Example = (props) => {
const value = useWindowSize();
return (
<Box class={props.class}>
<Box class="form-input" as="h2">
Window Size
</Box>
<h3>{`Height: ${value.height}`}</h3>
<h3>{`Width: ${value.width}`}</h3>
</Box>
);
};