Novice Pokémon Master

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

    0.17.0 • Public • Published

    @reach/window-size

    Stable release MIT license

    Docs | Source

    Measure the current window dimensions.

    import WindowSize, { useWindowSize } from "@reach/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>
      );
    }

    Keywords

    none

    Install

    npm i @reach/window-size

    DownloadsWeekly Downloads

    14,919

    Version

    0.17.0

    License

    MIT

    Unpacked Size

    9.73 kB

    Total Files

    9

    Last publish

    Collaborators

    • ryanflorence
    • mjackson
    • chancestrickland
    • blainekasten