Skip to content
Alea0.1

Overlays

Drawer

A panel that slides in from a side for filters, details or navigation.

Ant Design: Drawer

import { DrawerTrigger, Drawer, DrawerContent } from '@alea/ui';

Examples

Drawer

From the end by default; start and bottom too.

Props

Drawer props

A panel that slides in from the side: filters, details, navigation on mobile. Focus is trapped, Escape closes.

PropTypeDefaultDescription
placement"start" | "end" | "bottom"'end'Side it slides in from. Default end (right in left-to-right).
sizestring | number420Width (start/end) or height (bottom). Default 420 px.

Accessibility

  • A modal dialog: focus moves in and stays there; Escape closes.

Keyboard

KeyDoes
EscapeCloses
TabCycles inside

Do and don't

Do

  • Give it a title.

Don't

  • Don't put a whole page flow in a drawer.
Tested with axe, keyboard and screen reader roles