Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

useIsMobile

True below the 768px phone breakpoint.

HooksEnvironment@gaudi/design-system/hooks/environment/use-mobileView in StorybookSource

The breakpoint the AppShell sidebar and DateSelector use to switch to their phone layouts. False during server rendering and hydration.

Usage

import { useIsMobile } from '@gaudi/design-system/hooks';
const isMobile = useIsMobile();return isMobile ? <Drawer>{filters}</Drawer> : <aside>{filters}</aside>;

Examples

Storybook

API

1 return value

Accessibility

Switching layouts must not remove features: the phone layout should reach the same actions, often through a Sheet or Drawer.

Notes

  • Built on useMediaQuery; use that directly for other breakpoints.