Components
Dialog
Centered modal for a short, focused decision. Prefer Sheet for multi-field flows and mobile-first drafting.
When to use
- Confirmations (archive project, delete, leave without saving).
- Short forms that fit without scrolling on a phone.
- Use Sheet for project, sharing, and settings panels that need more space.
Example
Confirm
Title states the decision. Description explains the consequence. Destructive commit on the right.
Best practice
Do
- ✓Ask one question per dialog.
- ✓Name buttons after the outcome (Archive project), not vague Yes/No.
- ✓Keep focus trapped; Esc and overlay dismiss when safe.
Don’t
- ×Stack dialogs on dialogs.
- ×Put long wizards in a Dialog , use Sheet or a full page.
components/ui/dialog.tsx · z-130 above sheets
Memorisely