Overlays
Modal
Ask for a decision or input that needs the user’s attention before they continue.
Anatomy
- Dialog title
- Dismiss control
- Description
- Action area
- Backdrop
Configuration
Confirmation variants
Use when someone needs to review a choice before continuing.
Use before deleting data or making a change that can’t be undone.
Design tokens used
| Category | Token | Value | Where it’s used |
|---|---|---|---|
| Colour | --cc-foreground | — | Dialog title and supporting action labels |
--cc-muted-foreground | — | Dialog description and close icon | |
--cc-surface | — | Secondary button background | |
--cc-surface-muted | — | Cancel and close button backgrounds on hover | |
--cc-surface-elevated | — | Dialog panel background | |
--cc-border | — | Secondary button border | |
--cc-primary | — | Primary button background | |
--cc-primary-hover | — | Primary button background on hover | |
--cc-primary-foreground | — | Primary button label and icon | |
--cc-critical | — | Destructive button background | |
--cc-critical-hover | — | Destructive button background on hover | |
--cc-critical-foreground | — | Destructive button label | |
--cc-focus-ring | — | Keyboard focus ring | |
--cc-backdrop | — | Overlay behind the dialog |