ConfirmDialog

pro

ConfirmDialog wraps Dialog with a status icon, title, message, and cancel/confirm button pair for destructive or informational confirmations.

Installation

Add this component with the NateUI CLI.

npx nateui@latest add ConfirmDialog

Examples

Status Types

Custom Buttons

Controlled

API

PropDescriptionTypeDefault
isOpenControls whether the dialog is visible.boolean—
typeStatus variant that determines the icon and color.'info' | 'success' | 'warning' | 'danger''info'
titleDialog heading text.ReactNode | string—
childrenMessage body rendered below the title.ReactNode—
confirmTextLabel for the confirm button.ReactNode | string'Confirm'
cancelTextLabel for the cancel button.ReactNode | string'Cancel'
onConfirmCalled when the confirm button is clicked.() => void—
onCancelCalled when the cancel button is clicked.() => void—
confirmButtonPropsProps forwarded to the confirm Button.ButtonProps—
cancelButtonPropsProps forwarded to the cancel Button.ButtonProps—
closableShow a close button in the dialog header.booleanfalse
sizeWidth of the dialog.'sm' | 'md' | 'lg''md'