Skip to content

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

Filtre

Status

Filtre

Status
import { Drawer } from '@/components/software/overlay';

<Drawer open={open} onClose={() => setOpen(false)} title="Filtre">
  ...
</Drawer>

Props

PropTypeDefaultWhat it does
open (required)booleanWhether the drawer is shown.
onClose (required)() => voidCalled when the drawer closes.
title (required)stringThe 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.
hideTitlebooleanfalseHides the title from the eye.
footerReactNodeThe foot of the drawer, such as Actions.
closeLabelstring'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