All components

OVERLAYS / COMPONENTS

Modal

Give one decision focused attention.

Live component5 documented props

About modal

A Modal is an interactive UI overlay that captures users' attention by presenting content or actions in a layer above the main interface, often used for prompts, confirmations, or supplementary information. By temporarily interrupting the user flow, it ensures focus on a specific task or message, providing a more immersive and controlled user experience.

01

Anatomy

Shared parts, named consistently.

  1. 1
    Modal bodyRequired

    Outer container of Modal

  2. 2
    Content areaRequired

    Designated content area

  3. 3
    BackdropRequired

    Decorative element for obscuring UI beneath modal

  4. 4
    Close buttonRequired

    Dismisses modal and backdrop.

Try the default

A working example with the shared V1 visual language.

Check your tokens and component states before saving this release.

When to use

Use only when the current task needs an immediate decision. Keep the title, close control, and outcome explicit.

Focus is contained in the native modal. Escape closes; closing restores focus to the trigger.

Related components

Source & adaptation

V1 semantic colors, DM Sans typography, compact controls, and responsive layouts. The API table describes this implementation; source design notes may use earlier API terminology.

components/ui.tsx