modal-dialog-patterns

Installation
SKILL.md

Modal Dialog Patterns

When to Use What

Pattern When Why
Modal dialog Confirmation, short forms, critical alerts Blocks interaction, forces decision
Drawer/Sheet Detailed content, filters, secondary forms Slides in, partial page context
Toast/Snackbar Success confirmation, minor notifications Non-blocking, auto-dismisses
Inline expansion Progressive disclosure, details No context switch
Full-page Complex forms, multi-step flows Full context, no overlay

Modal Rules

  1. One primary action per modal. If you need two, use a full page.
  2. Always include a close mechanism: X button, overlay click, Escape key.
  3. Don't stack modals. A modal opening a modal is a UX failure.
  4. Trap focus inside. Tab should cycle within the modal, not escape to background.
  5. Prevent background scroll when modal is open.
  6. Size: As small as possible. Don't use a modal when an inline confirmation works.
Installs
3
GitHub Stars
11
First Seen
Jun 17, 2026
modal-dialog-patterns — dragoon0x/everything-design-taste