Skip to main content
  1. Docs
  2. Components
  3. Overlays

Drawer

A full-height panel from the edge: a task beside the page, with the page still in view.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div role="dialog">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Keyboard

KeysWhat happens
TabTabMoves through the drawer; focus stays inside while it's open.
EscapeCloses it, when it's dismissible; focus returns to the trigger.

02

Behaviour

Role and name
A dialog named by its title, described by its description.
Focus on open
The first field in the body; on touch, the drawer itself, so the phone's keyboard doesn't open over it.
Swipe
A swipe toward its edge closes it; text in the body selects without starting one.
Scrolling body
With nothing to focus in it, it takes focus, so it can be scrolled with the keys.

03

Tested

On every change, before it ships.

  • axe, WCAG 2.2 A and AA, in Chromium on every pull request
  • Firefox and WebKit every night
  • Focus: where it lands as it opens, and where it returns as it closes
  • Forced colours, reduced motion and right to left
Next — DrawerChangelog