Back to Ant Design

Popconfirm

components/popconfirm/index.en-US.md

6.3.72.4 KB
Original Source

When To Use

A simple and compact dialog used for asking for user confirmation.

The difference with the confirm modal dialog is that it's more lightweight than the static popped full-screen confirm modal.

Examples

<!-- prettier-ignore -->

<code src="./demo/basic.tsx">Basic</code> <code src="./demo/locale.tsx">Locale text</code> <code src="./demo/placement.tsx">Placement</code> <code src="./demo/shift.tsx" iframe="300">Auto Shift</code> <code src="./demo/dynamic-trigger.tsx">Conditional trigger</code> <code src="./demo/icon.tsx">Customize icon</code> <code src="./demo/async.tsx">Asynchronously close</code> <code src="./demo/promise.tsx">Asynchronously close on Promise</code> <code src="./demo/style-class.tsx" version="6.0.0">Custom semantic dom styling</code> <code src="./demo/render-panel.tsx" debug>_InternalPanelDoNotUseOrYouWillBeFired</code> <code src="./demo/wireframe.tsx" debug>Wireframe</code>

API

Common props ref:Common props

PropertyDescriptionTypeDefaultVersion
cancelButtonPropsThe cancel button propsButtonProps-
cancelTextThe text of the Cancel buttonstringCancel
disabledWhether show popconfirm when click its childrenNodebooleanfalse
iconCustomize icon of confirmationReactNode<ExclamationCircle />
okButtonPropsThe ok button propsButtonProps-
okTextThe text of the Confirm buttonstringOK
okTypeButton type of the Confirm buttonstringprimary
showCancelShow cancel buttonbooleantrue4.18.0
titleThe title of the confirmation boxReactNode | () => ReactNode-
descriptionThe description of the confirmation box titleReactNode | () => ReactNode-5.1.0
onCancelA callback of cancelfunction(e)-
onConfirmA callback of confirmationfunction(e)-
onPopupClickA callback of popup clickfunction(e)-5.5.0
<!-- Common API -->

<embed src="../tooltip/shared/sharedProps.en-US.md"></embed>

Semantic DOM

<code src="./demo/_semantic.tsx" simplify="true"></code>

Design Token

<ComponentTokenTable component="Popconfirm"></ComponentTokenTable>

FAQ

<embed src="../tooltip/shared/sharedFAQ.en-US.md"></embed>

For more questions, please refer to Tooltip FAQ.