@wikimedia/codex
Version:
Codex Design System for Wikimedia
14 lines (13 loc) • 430 B
TypeScript
export interface BreakpointMatch {
mobile: boolean;
tablet: boolean;
desktop: boolean;
'desktop-wide': boolean;
}
/**
* Composable to detect which breakpoint(s) the current viewport matches.
* Returns a reactive object that updates when the window is resized.
*
* @return Reactive object with boolean flags: mobile, tablet, desktop, 'desktop-wide'
*/
export default function useBreakpoint(): BreakpointMatch;