Skip to content

Dialog

A window overlaid on the primary window. Blocks interaction until dismissed. Built on Radix UI Dialog.

$cookest-ui add dialog

Basic

Simple informational dialog triggered by a button.

Form Dialog

Use dialogs to capture input without leaving the current page.

PropTypeDefaultDescription
openbooleanControlled open state of the dialog.
onOpenChange(open: boolean) => voidCallback when the dialog open state changes.
DialogTriggerReactNodeThe element that opens the dialog. Use asChild to forward props.
DialogTitlestringRequired accessible title displayed in the dialog header.
DialogDescriptionstringOptional supporting description text.
DialogFooterReactNodeContainer for action buttons, right-aligned by default.