Skip to main content

Function: isNarrowerThan()

isNarrowerThan(width, matchMedia?): boolean

Defined in: src/ui/elements/PcButtonMenu/index.ts:16

Whether the window is narrower than a width (CSS pixels). False without a width or matchMedia.

Parameters​

width​

number | undefined

matchMedia?​

((query) => object) | undefined = ...

Returns​

boolean

Example​

isNarrowerThan(900); // true in a 600px-wide window