RRigdesign system
Overlays

Dialog

A modal for focused, deterministic decisions with header, content slot and action zone.

Examples

Click to try: focus is trapped, Esc closes, focus returns to the button

Delete this project?

This cannot be undone and removes every linked asset.

Anatomy

Dialog anatomy
#PartDescriptionPresence
1Container28px blur, stacked shadowsRequired
2TitleHeading, names the dialogRequired
3Content slotAgnosticRequired
4ActionsRight aligned, primary lastRequired
5CloseButton or CancelRequired

Specifications

SizesSmall · Medium · Large
Padding20px · 24px · 28px
Surface28px backdrop blur with stacked deep shadows

Interaction

Keyboard
KeyResult
Tab Shift+TabCycles inside the dialog
EscCloses
EnterActivates the focused button
Pointer and touch
TriggerResponse
OpenScale 0.96 to 1 and fade, 200ms
Backdrop clickCloses non-destructive dialogs
CloseFocus returns to the element that opened it

Accessibility

role · dialog (modal)

2.1.2No Keyboard Trap2.4.3Focus Order2.4.11Focus Not Obscured4.1.2Name, Role, Value
Requirements
RequirementHow Rig meets it
Native element<dialog> with showModal() gives focus trapping, inert background and Esc
Namearia-labelledby on the title; aria-describedby on the message
Initial focusOn the least destructive action, or the first field
Return focusTo the trigger
ScrollLock page scroll; content scrolls inside
ReflowWorks at 320px width

Read the matching WAI pattern ↗

Usage

Do and don’t
DoDon’t
Ask one questionDo not open a dialog on page load
Name the action: Delete project, not OKDo not stack dialogs