Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    Popconfirm

    A small confirmation panel next to a button that asks yes or no before a light action.

    Storybook
    Storybook
    Source
    Source
    • For a quick confirmation before an action that can be undone or has a small effect: archiving, removing a row from a list, deleting a draft.
    • For actions with a large effect or that cannot be undone: closing an account, a bulk refund. Use AlertDialog.
    • When the action can be undone and is frequent: do not ask; offer undo in a Toast.
    • When more information or a form is needed: use Dialog or Popover.
    1. Trigger: the button that needs confirmation.
    2. Title: the question; it names the panel.
    3. Description: optional, one sentence on the result.
    4. Buttons: cancel and confirm.
    • Pressing the trigger opens the panel; focus moves to the cancel button.
    • Confirm calls onConfirm; when it returns a promise, loading shows and the panel closes when the work ends.
    • Cancel, Escape or an outside press calls onCancel and closes the panel.
    • The panel cannot be closed while the work runs.
    • Write the action verb on the confirm button: “Delete”, “Archive”; not “Yes”.
    • Keep the question short; use AlertDialog when details are needed.
    • The title is a question: “Delete this card?”.
    • The description states the result: “This cannot be undone.”
    • AlertDialog: a blocking confirmation for heavy actions.
    • Popover: a panel with interactive content.
    • Toast: undo after the action.