Hooks

useMatchResolution

Detect the screen resolution against a set of breakpoints. Reactive: updates on window resize. Provides booleans for common breakpoints plus a match(query) helper for custom queries.

import { useMatchResolution, defaultBreakpoints } from "@empreint/ui";

const { resolution, match } = useMatchResolution(navigator.userAgent);

if (resolution.isMobile) return <MobileLayout />;

Parameters

Prop

Type

Returns

Prop

Type