Internal ID software / Overlays
Drawer
The same dialog against an edge, as tall as the screen.
Not drawn in Figma: built only from the tokens, for internal ID software. In code: components/software/overlay.tsx. From the old system: Drawer in @id-identity-as/ui/overlay.
Example
import { Drawer } from '@/components/software/overlay';
<Drawer open={open} onClose={() => setOpen(false)} title="Filtre">
...
</Drawer>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
open (required) | boolean | Whether the drawer is shown. | |
onClose (required) | () => void | Called when the drawer closes. | |
title (required) | string | The name of the drawer, read aloud when it opens. | |
side | 'start' | 'end' | 'end' | The edge the drawer comes from. End is the right in a left to right language. |
hideTitle | boolean | false | Hides the title from the eye. |
footer | ReactNode | The foot of the drawer, such as Actions. | |
closeLabel | string | 'Luk' | The name of the close button. |
Do
- Use it for filters, for a detail beside a list, and for the menu on a phone.
- Keep the list behind it in place, so closing returns to the same spot.
Do not
- Do not put a whole flow of several steps in a drawer. Give it a page.
- Do not slide it in with an animation of your own. Motion is not decided yet.
Accessibility
- The native dialog element, as Dialog: focus is kept inside and Escape closes it.
- Named by its title.
Tokens it uses
- color.surface.base
- color.border.default
- color.text.default
- color.neutral.900
- type.heading.md
- type.body.md
- space.inline.4
- space.inline.5