Popconfirm

A compact confirmation dialog attached to an element.

When to Use

  • For quick confirmation before simple actions
  • When a full modal is too heavy for the confirmation
  • For delete or toggle confirmations

Import

import { Popconfirm } from "orizon";

Examples

Basic

<Popconfirm
  title="Are you sure?"
  description="This action cannot be undone."
  onConfirm={() => console.log("Confirmed")}
  onCancel={() => console.log("Cancelled")}
>
  <Button danger>Delete</Button>
</Popconfirm>

Custom Buttons

<Popconfirm title="Proceed?" okText="Yes" cancelText="No">
  <Button>Action</Button>
</Popconfirm>

Placement

<Popconfirm title="Confirm?" placement="top">
  <Button>Top</Button>
</Popconfirm>

API

PopconfirmProps

  • titleReactNode — Confirmation title
  • descriptionReactNode — Additional description
  • onConfirm() => void — Confirm callback
  • onCancel() => void — Cancel callback
  • okTextstring — Confirm button text (default: "OK")
  • cancelTextstring — Cancel button text (default: "Cancel")
  • placement"top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "right" — Position
  • openboolean — Controlled visibility
  • onOpenChange(open: boolean) => void — Visibility callback
  • disabledboolean — Disable the popconfirm
  • showCancelboolean — Show cancel button (default: true)
  • okTypeButtonType — Confirm button type (default: "primary")
  • iconReactNode — Custom icon