Dialog
Dialog
A modal window requiring user decision before proceeding.
$ npx verticallyworks add dialogHow does a dialog present in a full-vertical interface without disorienting the user?
DecisionDialogs interrupt reading. Their animation should feel orthogonal to reading direction · appearing from above (scale) rather than from a reading-axis edge.
Default
The content reads vertically · title, body, and actions as columns flowing right-to-left. The dialog still scales up from center (not from a trigger), which reads as a layer above the page rather than a continuation of the reading flow.
Source
The exact file npx verticallyworks add dialog copies into your project · yours to edit. Styling comes entirely from the design tokens.
Guidance
- Animate with scale-up from center · avoids reading-axis conflict
- Keep dialogs to a maximum of 2 actions
- Trap focus inside the dialog until dismissed
- Animate dialogs from the reading direction edges
- Use dialogs for non-critical information (use Toast instead)
- Place vertical text inside a dialog · it reads like content, not a decision interface
Accessibility
role='dialog', aria-modal, aria-labelledby, aria-describedby. Focus trapped. Escape closes. Focus returns to trigger.
Should a dialog's action buttons be arranged horizontally (conventional) or vertically (matching the layout) in a fully vertical interface?