For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/popconfirm.md.
v0.0.57
  • English
  • Popconfirm

    Feedback@rockshin/tao-ui

    Shows a compact confirmation popup anchored to a trigger element, with OK and Cancel actions.

    When to use

    Use Popconfirm for lightweight inline confirmations such as delete actions, where a full Modal would be too heavy. Use Modal.confirm for critical or complex confirmations.

    Recommended

    • Keep the title to one short question; put detail in the description.
    • Use Popconfirm for reversible, low-risk actions anchored to the control that triggers them.

    Avoid

    • Do not use Popconfirm for irreversible high-risk operations; use Modal.confirm instead.
    • Do not put forms or rich interactions inside a Popconfirm.

    Examples

    Basic usage

    TSX

    Description and custom labels

    TSX

    Button props and disabled state

    TSX

    Confirm and cancel outcomes

    Handle both callbacks and show the chosen outcome inline.

    No decision yet
    TSX

    Conditional availability

    disabled prevents opening; a separate switch demonstrates availability.

    TSX

    Placement and icon

    placement sets the preferred direction, and icon=null hides the default warning icon.

    TSX

    API

    Popconfirm

    PropertyDescriptionTypeDefault Value
    titleMain question text of the confirm popup (required, antd parity).ReactNode (Required)-
    descriptionSecondary text shown under the title.ReactNode-
    onConfirmCalled when OK is clicked; the popup also closes.((e?: MouseEvent<HTMLElement, MouseEvent> | undefined) => void) | undefined-
    onCancelCalled when Cancel is clicked; the popup also closes.((e?: MouseEvent<HTMLElement, MouseEvent> | undefined) => void) | undefined-
    okTextText of the OK button. Defaults to 'OK'.ReactNode-
    cancelTextText of the Cancel button. Defaults to 'Cancel'.ReactNode-
    okButtonPropsExtra props forwarded to the OK button.ButtonProps | undefined-
    cancelButtonPropsExtra props forwarded to the Cancel button.ButtonProps | undefined-
    iconIcon shown before the title. Defaults to a warning triangle; pass null to hide it.ReactNode-
    disabledWhen true, the trigger still renders but the popup never opens.boolean | undefined-
    placementPopup side relative to the trigger. Defaults to 'top'.PopoverPlacement | undefinedtop
    classNameMerged onto the confirm content wrapper.string | undefined-
    styleAdditional styleCSSProperties | undefined-
    childrenExactly one trigger element.ReactNode (Required)-