opinion
Popconfirm
A small yes/no confirmation that opens right at its trigger.
Delete projectClick the button to open the confirmation
In context
Project filesEach delete asks first
FilesHarbour rebrand
van-livery-photos.zip
48 MB
mark-stacked.svg
8 KB
Props
| Prop | Type | Required | Default |
|---|---|---|---|
trigger | ReactElement<unknown, string | JSXElementConstructor<any>> | Yes | — |
title | string | Yes | — |
description | string | undefined | No | — |
onConfirm | () => void | Yes | — |
onCancel | (() => void) | undefined | No | — |
confirmLabel | string | undefined | No | Yes |
cancelLabel | string | undefined | No | No |
destructive | boolean | undefined | No | false |
open | boolean | undefined | No | — |
onOpenChange | ((open: boolean) => void) | undefined | No | — |
data-rebar-* attributes
data-rebar-component="popconfirm"; parts: title, description, actions, cancel, confirm.
Migrating to Ant Design
AntD's own Popconfirm is a close direct equivalent — title/description/onConfirm/onCancel map directly; confirmLabel/cancelLabel map to AntD's okText/cancelText.