Skip to content
SproutAceve · v3.11.0
Get started
Overview What is your role? Getting started Install Adopting Sprout
Foundations
Brand & logos Color Typography Spacing & layout Elevation Iconography Accessibility
Components
Overview Buttons Inputs & forms Data grid Ribbon toolbar Navigation Cards Dialog Tabs Context menu
Practice
Interaction & motion Voice & content Product patterns AI patterns
People & ethics
Design principles Personas UX ethics Trust & direction
Playground
Build the systemplay Tower of tokensplay
Behind the system
How it works Why it pays Changelogv3.11 Roadmap Contribute
Components

Dialog.

A modal that interrupts the flow for one decision — confirm, edit, or warn. It traps focus, dims the page behind a scrim, and returns focus to the trigger when it closes. Use it sparingly; if the task has more than a few fields, reach for a drawer instead.

Anatomy

Title, body, and a footer where the primary action sits on the right.

Delete cost category?
This removes 12 line items. You can undo this for 10 seconds afterwards.
Surfacevar(--surface)
Radiusvar(--radius-3)
Shadowvar(--shadow-overlay)
Scrimrgba(20,20,15,.32)
Default width360–480px

Accessibility

A dialog that doesn't trap focus is a trap of a different kind.

role="dialog"On the panel, always paired with aria-modal="true".
aria-labelledbyPoints at the title element, so screen readers announce the dialog by name.
Focus trapTab and Shift+Tab cycle within the dialog; nothing behind the scrim is reachable.
Initial focusMoves to the first interactive element — or the dialog itself if there is none.
Esc closesEscape dismisses non-destructive dialogs; focus returns to the trigger.
Scrim clickCloses the dialog for light, dismissible cases — never for destructive confirms.

Props (React)

type DialogProps = {
  open: boolean;
  onClose: () => void;          // Esc, scrim click, or close button
  title: string;                // wired to aria-labelledby
  children: ReactNode;          // body content
  footer?: ReactNode;           // actions — primary on the right
  dismissible?: boolean;        // default true; false for destructive confirms
};
← PreviousCardsNext →Tabs
Sprout · Aceve Design System · v3.11.0
Figma library GitLabReleases