Modal / Dialog
Overlaid modal dialog for focused tasks, confirmations, and complex forms
What is it?
A modal (dialog) is an overlaid UI surface that captures user attention to complete a task, show critical information, or request a confirmation. Modals typically include a header, body content, and footer actions (primary and secondary buttons). They should be dismissible via a close control, escape key, and an optional backdrop click.
Mockdown
``` ┌────────────────────────────────────────────┐ │ [Title] [X] │ │ ────────────────────────────────────────── │ │ │ │ │ │ │ Modal body content goes here. │ │ │ │ Forms, previews, or messages. │ │ │ │ │ │ │ ────────────────────────────────────────── │ │ [Secondary] [Primary] │ └────────────────────────────────────────────┘ ``` Characteristics: - Focus trapping and accessible labels - Clear primary/secondary actions - Dismissible by Esc and close button - Backdrop to emphasize modal
Layouts Using This Pattern
Use these prompts to generate layouts built with this pattern.
Ready to build?
Use this pattern as inspiration when creating UI layouts with AI tools.