Rebar UI

1.0

opinion

Popconfirm

A small yes/no confirmation that opens right at its trigger.

Delete projectClick the button to open the confirmation
Neutral
Custom labels
Title only

In context

Project filesEach delete asks first
FilesHarbour rebrand

van-livery-photos.zip

48 MB

mark-stacked.svg

8 KB

Props

PropTypeRequiredDefault
triggerReactElement<unknown, string | JSXElementConstructor<any>>Yes—
titlestringYes—
descriptionstring | undefinedNo—
onConfirm() => voidYes—
onCancel(() => void) | undefinedNo—
confirmLabelstring | undefinedNoYes
cancelLabelstring | undefinedNoNo
destructiveboolean | undefinedNofalse
openboolean | undefinedNo—
onOpenChange((open: boolean) => void) | undefinedNo—

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.