ACTIONS & SURFACES
Drawer
Sliding side panel built on the Radix Dialog primitive. Comes in four sides (left, right, top, bottom), with a close button baked in and the same Memphis shadow chrome as Dialog.
Import
Live example
docsChrome.sections.sides
Right is the default — typical for filters and detail panels. Bottom works well on mobile.
Props
Drawer props
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | — | Controlled open state on the root. |
| defaultOpen | boolean | false | Uncontrolled initial open state on the root. |
| onOpenChange | (open: boolean) => void | — | Fires whenever the open state changes. |
| side | 'left' | 'right' | 'top' | 'bottom' | 'right' | Prop on DrawerContent. Sets the slide-in edge of the panel. |
| hideClose | boolean | false | Prop on DrawerContent. Hides the built-in close button (rendered as an X in the upper right). Useful when the consumer renders their own close affordance. |
Accessibility
- Built on Radix Dialog: focus is trapped inside the panel while open and returned to the trigger on close. Esc closes the drawer; clicks on the overlay close it too.
- Always pair
DrawerTitleandDrawerDescriptionwith the content — Radix wires them as the dialog's accessible name and description. - The built-in close button uses an Italian label
aria-label="Chiudi". There is currently no prop to override it; if you need a different language, sethideCloseand render your own close affordance withDrawerCloseasasChild.
Drawer vs Dialog
- Reach for Drawer when the panel hosts a flow of related controls (filters, settings, side editor) — the panel can stay tall and dominate one edge of the screen.
- Reach for Dialog for a centred modal — confirmations, single-step forms, or focused tasks.