Drawers UsageOverview

A drawer:

Do's and Don'ts

Anatomy Behavior

Drawers slide in right-to-left, from the right margin of the page and re-flow the canvas, pushing the content left up to the minimum breakpoint (for desktop). On mobile devices, the drawer overlays the main content, with a clear way to close it and/or get back to the flow.

If content overflows the screen's height, the drawer can scroll individually within the panel.

In some scenarios, where the drawer is co-planar, it may scroll with the page.

Focus (for screen readers)

Once the drawer is opened, the screen reader should shift focus to its content. Conversely, once it is closed, focus returns to the previously focused element.

The drawer can also be closed via the keyboard, using the Escape key.

Placement and Style

When opened, the drawer is placed either below the trigger element or it covers the right side of the page top to bottom as a non-modal panel. It sits flush to the right side of the page.

Style

HTML/CSS v2Default