UI / Components / layout / Dialog

Dialog

Confirm-destructive variant of Modal.

Confirmation dialog for destructive actions. Title + body + Cancel + Confirm. Confirm button defaults to the destructive variant. Pair with `useDialog()` for imperative one-liners.

$npx dock-ui add dialog

Usage

import { useDialog } from "@/components/ui/dialog";

const ok = await dialog.confirm({
  title: "Delete this workspace?",
  body: "All rows + docs will be archived.",
  confirmLabel: "Delete",
});

Install

via CLI
$ npx dock-ui add dialog
Writes the file(s) directly to your components/ui/ folder. You own the code.
For agents
curl -L https://ui.trydock.ai/r/dialog.json
Returns a JSON manifest with file paths + contents. Agent-readable, LLM-fetchable.
← All components
Themes·Component kit · glossary
View on GitHub →