Modal vs Drawer
Choosing between centered Modals for high-priority interruptions and slide-over Drawers for contextual secondary tasks and navigation
Table of Contents
Interactive Playground
Tap or drag to interact with the demoWhat is Modal vs Drawer?
Choosing between centered Modals for high-priority interruptions and slide-over Drawers for contextual secondary tasks and navigation. It is a core concept in UI Components within UI / UX.
Core Principles
Both Modals and Drawers (Sheets) render as overlays above the active page, but they differ in interruption intensity and content capacity.
A Modal centers on screen behind a dimmed backdrop to demand immediate focus for a discrete decision—such as confirming a destructive action. A Drawer slides in from the left, right, or bottom edge, preserving visual awareness of the underlying list or canvas while accommodating longer forms, filters, or inspectors.
Practical Takeaways
- Never stack modals on modals: Nested dialogs disorient users and break escape flows. Promote complex multi-step workflows to a drawer or dedicated route instead.
- Adapt drawers to Bottom Sheets on mobile: Slide-up sheets with drag-to-dismiss gestures align naturally with thumb reach on handheld devices.
- Enforce accessibility fundamentals: Trap keyboard focus inside the overlay, close on
Escape, restore focus to the triggering control on dismissal, and setrole="dialog"/aria-modal="true".
Notable Examples
- Destructive confirmation modals: Requiring explicit confirmation before permanently deleting a workspace or billing method.
- E-commerce cart & filter drawers: Adjusting cart quantities or multi-facet filters without navigating away from the catalog.
- Kanban detail slide-overs: Inspecting and editing task metadata in a right-hand drawer while keeping the board visible.