byronwade/ui
Application UI

Overlays · Application UI

Dialog

A modal dialog compound component built on Base UI's Dialog primitive, with overlay, content popup, header, footer, title, description, and close button sub-components.

Feature showcase

Installation

Features

  • Compound overlay parts

    Ships root, trigger, portal, overlay, content, title, description, footer, and close parts.

  • Controlled or uncontrolled

    Supports open/defaultOpen with onOpenChange for app-managed dialog state.

  • Accessible modal behavior

    Builds on Base UI Dialog for focus handling and dialog semantics.

API

Props

PropTypeDefaultDescription
openboolean-Controlled open state of the dialog.
defaultOpenboolean-Uncontrolled initial open state.
onOpenChange(open: boolean) => void-Callback fired when the open state changes.
modalbooleantrueWhether the dialog blocks interaction with the rest of the page.

Exports

ExportKindDescription
DialogcomponentRoot Base UI dialog primitive.
DialogTriggercomponentElement that opens the dialog.
DialogContentcomponentPositioned dialog surface with optional close button.
DialogTitlecomponentAccessible dialog title.

Slots

SlotElementDescription
dialog-Root dialog state provider.
dialog-trigger-Trigger element.
dialog-overlay-Backdrop layer.
dialog-content-Dialog panel.
dialog-title-Title text.
dialog-description-Description text.

Source and related

FilePath
Componentregistry/ui/dialog.tsx
Default examplecontent/examples/dialog/default.tsx
Form examplecontent/examples/dialog/with-form.tsx