Confirm
Ask for confirmation before an important action.
Async confirmation
Live previewAsync confirmation
basic.tsx
Confirm API
useConfirm API
ConfirmOptions
Types
Import types when defining reusable component props or assembling options.
Usage notes
useConfirm returns confirm and contextHolder. Render the holder inside ConfigProvider to inherit regional settings. You can also render Confirm directly and control open and onClose. Async confirmation displays a loading state and prevents duplicate actions.
See Modal API for inherited attributes.
default has no icon. info, warning, success and danger have distinct icons and colors. Only danger has a red OK button; success hides Cancel by default. Use showCancel to override it. Button props follow Modal. onCancel notifies cancellation before onClose.