Dialog

A modal surface for focused tasks.

Installation

import { Dialog } from "~/components/ui/Dialog";

Usage

<Dialog
  trigger={<Button>Create a worker</Button>}
  title="Create a worker"
  description="Spin up a new edge worker."
>
  <p>...</p>
</Dialog>

API reference

PropTypeDefaultDescription
triggerReactElement-Element that opens the dialog (props are merged in).
titleReactNode-Dialog title (announced to screen readers).
descriptionReactNode-Optional supporting text.
childrenReactNode-Dialog body content.

Accessibility

  • Built on the Base UI Dialog primitive: focus is trapped, the backdrop is inert, and Escape closes.
  • Title and description are wired to aria-labelledby / aria-describedby automatically.
View site