Overlay

Drawer

A panel against a screen edge, in three variants. temporary (the default) opens over a backdrop and traps keyboard focus inside, like a Modal. persistent sits beside the page and pushes content aside as it opens. permanent stays open, like a desktop sidebar. Many layouts use permanent on wide screens and temporary on narrow ones.

ReactVueWeb Components
View in Storybook

Playground

Examples

<Drawer open={open} onClose={close} anchor="left" title="Menu">…</Drawer>
<Drawer variant="permanent" anchor="left" ariaLabel="Sections">…</Drawer>

Props

Name Type Default Description
open boolean false Whether the drawer is open. Required for `temporary`/`persistent`; ignored for `permanent` (always shown). @default false
onClose () => void Called when the drawer requests to close (Escape / backdrop — temporary).
variant DrawerVariant temporary Relationship to the page. @default 'temporary'
anchor DrawerAnchor left Edge to anchor to. @default 'left'
title ReactNode Visible title; also becomes the dialog's accessible name (temporary).
ariaLabel string Accessible name when there is no visible `title` (e.g. a navigation drawer). Applied as `aria-label`.
children required ReactNode Drawer content.
className string

Accessibility

  • Body/background contrast is ≥ 7:1 (AAA) in both light and dark.
  • Every interaction works with the keyboard alone.
  • The focus ring is always visible.
  • Respects prefers-reduced-motion and stops excessive motion.

Every component is designed to meet WCAG 2.1 AAA.