Skip to main content
ContainersLevel 2

Drawer

抽屉

MobileWebDesktopDifficulty: Medium

A panel that slides in from the edge of the screen, usually from the side, sometimes from the bottom.

01

Live Demo

Actually clickable

The drawer covers this half of the page

Slides in from the left (constrained to the demo area here). What separates it from a Bottom Sheet: a Drawer docks to the side and holds an entire region of content.

What you just saw:The menu that slides in from the left when you tap the hamburger icon, the "Selected items" panel that slides out from the right in a shopping cart, the settings panel that side-slides in.

02

What it actually is

What defines a drawer is that it slides in from an edge and either pushes aside or covers the original page. A drawer that slides up from the bottom is usually just a bottom sheet; the real distinction is the side drawer, which carries navigation or filters without interrupting the main flow.

drawerside drawerslide-out paneloff-canvas panelside panelnavigation drawer
03

Anatomy · What it's made of

  1. Overlay遮罩层

    Translucent black, closes on click

  2. Panel面板

    Slides in from the side, width 280–320px

  3. Handle边缘把手

    Optional, hints that the panel can slide out

  4. Content内容

    Navigation items or a form

04

When to Use

When it fits, and when it doesn't
Drawer usage recommendations
SituationUse it?
Mobile needs room for entries that bottom navigation cannot fitYes
There are many filter conditions that need a full panel to live inYes
The main content needs to stay visible (to compare against filtered results)Depends
You need to show a large amount of information at once (help, details)No

Once a drawer holds tabs and accordions, it is a page wearing a disguise — just navigate there.

Nesting drawers inside drawers turns the back behavior into a guessing game.

05

Similar Patterns

Don't mix these up
06

How to tell AI

Three levels of prompt

Add the component name and specifics

Add a drawer that slides in from the left, 300px wide, carrying the primary navigation. A hamburger button opens it; a scrim click or Esc closes it, and focus returns to the button on close.

07

Don't just say this to AI

Bad → Better

Don't say this to AI

Add a side panel that slides out.

Say this instead

Add a left drawer (300px wide): opened by a hamburger button, 40% scrim, Esc and scrim click both close it, focus trapped inside, focus returned to the button on close, background scroll locked, and a permanent sidebar at ≥1024px instead of a drawer.

08

Share this card

Social-ready

Turn this pattern into a 3:4 or 1:1 knowledge card and export it as PNG right in the browser. No backend needed.