Overlays Modal

Components

Modal

A focused dialog over the page for short, blocking tasks.

Default

Variants

Sticky header, scrollable body & footer

The pinned header/footer with an internal scroll region is geist's Sticky and shadcn's Sticky Footer + Scrollable Content. Other upstream variants map to props on the same primitive: showCloseButton={false} for No Close Button, a hand-placed <DialogClose> for a Custom Close Button, and initialFocus for Control initial focus (see “Focus input on open” above). Inset sections are just a bordered -mx-6 block inside the body; the Base UI dialog already traps focus (Toasts and focus trap) and, combined with a responsive max-w, presents as a bottom sheet with working inputs on mobile (Mobile sheet inputs).

Markdown for agents: /design/modal.md · spec: /design.md