Dialog

Overlays & Feedback

macOS system modal alert dialog with translucent backdrop blur.

Installation

$npx shadcn-macos@latest add dialog

Examples

Props

<Dialog />
PropTypeDefaultDescription
open*booleanControls whether the dialog modal is visible.
onOpenChange*(open: boolean) => voidCallback invoked when modal is opened or dismissed.
title*stringHeadline dialog message.
descriptionstringExplanatory context under the title.
confirmTextstring"OK"Text for the primary confirm button.
cancelTextstring"Cancel"Text for the secondary cancel button.
destructivebooleanfalseWhether the confirm button uses destructive red styling.
onConfirm() => voidCallback invoked when confirm button is clicked.
onCancel() => voidCallback invoked when cancel button is clicked.