Modal or drawer?
Both float above the page, both dim what's behind them — but they answer different questions. This guide is the decision framework; the style guide shows the components themselves.
A modal is the app interrupting the user; a drawer is the user inspecting something. Modals demand a decision before anything else can happen, so they earn their interruption only when that decision is short. Drawers accompany the page rather than blocking it — the user opens one, works in it, and expects the page behind to still be there.
Quick reference
The three tools, side by side. When in doubt, drop down a row — a drawer beats an overloaded modal, a page beats an overloaded drawer.
| Modal | Drawer | Full page | |
|---|---|---|---|
| Feels like | An interruption | A side panel | A destination |
| Content size | One decision, ≤3 fields | Scrollable, sectioned | Unlimited |
| Context behind | Irrelevant to the decision | Still visible & useful | Replaced |
| Typical jobs | Confirm, quick input, alert | Record detail, edit forms, settings | Primary tasks, wizards |
| In this app | DialogPopup | DialogSheet | page.tsx |
Five questions
Walk them in order — the first question that gives a clear answer decides it.
- 1Who started this — the app or the user?
The app needs an answer before anything continues (confirm a delete, resolve an error, warn about unsaved changes) → modal. The user chose to open something and the app is just showing it → drawer or page.
- 2How much content is there?
A single decision, or one to three fields, readable without scrolling → modal. Anything that scrolls, has sections or tabs, or needs a header–body–footer structure → drawer.
- 3Does the page behind still matter?
If the user needs to reference the page underneath — checking a row in the table, comparing values, working through a list record by record → drawer. A modal deliberately hides the context; only use it when the context genuinely doesn't matter for the decision.
- 4Does it need a URL, the back button, or multiple steps?
Deep-linkable, shareable, part of a multi-step flow, or complex enough to have its own sub-navigation → it's a page, not an overlay. Overlays are for side quests, not the main quest.
- 5Will it need to open something else?
Modals must not stack on modals. If the content contains actions that open pickers, previews, or confirmations, start from a drawer (a modal on top of a drawer is fine, and a drawer may drill into one more drawer) or a page.
Reach for a modal when…
Short, centred, blocking. The user deals with it and moves on — seconds, not minutes.
- Destructive or irreversible confirmations — delete, remove access, cancel a shiftDelete saved view
- One quick input before an action can proceed — name a thing, pick a dateSave view, Create form
- Blocking errors and warnings the user must acknowledgeUnsaved changes warning
- A short, focused choice from a small listAdd a task to a project
Reach for a drawer when…
The user is inspecting or editing something adjacent to the page — the page stays put, the drawer visits.
- Record detail opened from a list — peek at a row without losing your placeParticipant drawer
- Create / edit forms with more than a few fieldsTemplate drawer
- Settings or configuration panels with grouped optionsForm settings
- Supporting context alongside the main task — notes, activity, previewTask notes
Use neither when…
Overlays are for side quests. The moment something is the main task, give it a page.
- Primary workflows the user came here to do — those deserve the whole screen
- Multi-step flows and wizards (progress needs room, and the back button should work)
- Anything that should be shareable or bookmarkable via URL
- Long forms (roughly 8+ fields) or layouts with their own tables and navigation
A warning inside a modal
When a modal's primary turns up something to confirm, the warning joins the modal instead of stacking a second one on it. DES-54.
- The warning appears as a band at the end of the modal's body, just above the footer, and the primary turns into Extend Anyway or Reinstate Anyway. That press is the confirmation, so there's no “Are you sure?”.
- The band is announced when it appears. Focus stays on the primary you just pressed.
- Changing an input clears the band, since it described the old input.
- From a drawer or a page, the same warning is still its own modal: that's the app interrupting, and a band at the foot of a long drawer would sit out of view.
This recurring group support ends on 31 Oct 2026.
This recurring group support ends on 31 Oct 2026.
- Aroha Ngata is not available during the shift on 7 Nov 2026.
- Grace Okafor has a pending leave request during 2 shifts in this series, from 14 Nov 2026.
Do / Don't
- Always include a visible title and an explicit close affordance
- Confirmations are always modals — a drawer is too easy to dismiss for a destructive decision
- A modal over a drawer is fine (e.g. a delete confirm inside a record drawer)
- A warning raised inside a modal joins it: a band above the footer, and the primary becomes “… Anyway”
- On dirty forms, intercept backdrop-click and Esc with a discard confirmation
- Return focus to the element that opened the overlay when it closes
- Don't put a long or scrolling form in a modal — that's the drawer's job
- Don't stack a modal on a modal, not even for a warning, and keep drawer drill-ins to two layers — a third layer means it should be a page
- Don't use a drawer for a blocking error or confirmation — it reads as optional
- Don't open any overlay automatically on page load
- Don't use overlays for the primary task — a side quest UI for the main quest feels cramped
Behaviour both share
Whichever presentation wins, the mechanics are the same — both are the one Base UI dialog underneath.
- Focus is trapped inside while open, and returns to the trigger on close.
- Esc and backdrop-click close it — unless the form is dirty, in which case confirm the discard first.
- Every overlay has a title, even if visually hidden, so screen readers announce it.
- On mobile the drawer grows to near-fullscreen and the modal stays compact — another reason typed-heavy content belongs in the drawer.
Sources
The framework distils published guidance — worth reading in full when a case doesn't fit neatly.
- Nielsen Norman Group — Modal & Nonmodal Dialogs
- Material Design 3 — Dialogs
- Material Design 3 — Side sheets
- Shopify Polaris — Modal
- IBM Carbon — Dialogs pattern
Agents get the same rules in condensed form: apps/next/docs/ux-guides/modal-vs-drawer.md — keep both in sync when the framework changes.