SkunkworksDesign System
Explore the system
Components / 1.0

A moment of focus.

Use a modal only when a task needs a focused decision.

Interactive example

Design system / Example

Keep the decision clear.

Native dialogs contain keyboard focus, support Escape and return focus to the control that opened them.

This example uses the native dialog element and components.js. Escape closes it. Both actions only dismiss the example.

Code

<button class="sk-button" type="button" data-open-dialog="example-dialog">Open example dialog <span aria-hidden="true">↗</span></button><dialog class="sk-dialog" id="example-dialog" aria-labelledby="example-dialog-title"><span class="eyebrow">Design system / Example</span><h2 id="example-dialog-title">Keep the decision clear.</h2><p>Native dialogs contain keyboard focus, support Escape and return focus to the control that opened them.</p><div class="button-row"><button class="sk-button" type="button" data-close-dialog>Done</button><button class="sk-button secondary" type="button" data-close-dialog>Cancel</button></div></dialog>

Usage

  • Include a visible title and an explicit dismiss or cancel action.
  • Place initial focus deliberately; for destructive actions, choose a safe starting point.
  • Do not place a modal inside another modal.
  • For irreversible actions, state the object and consequence before confirmation.
Up nextMake outcomes understandable.

Find your building block.

Type to search the design system.

Press Esc to close · Ctrl / ⌘ K to search
Your privacy

Your choices. Your control.

We save your preferences in this browser. This release loads no optional analytics or advertising scripts.

Theme and preference choices help the site remember your settings.

No analytics service is active in this release. This choice is reserved for an integration that honours consent.

Read the website privacy information →