AhaSlides Design
v0.52.0React · Vue · Lit

Components · Feedback

Popconfirm

A lightweight inline confirmation popover anchored to the trigger — confirm/cancel a low-risk action.

Examples

API

PropTypeDefaultNotes
titlestringThe confirmation question
descriptionstringOptional supporting line
okTextstringOKConfirm button label
cancelTextstringCancelCancel button label
onConfirm() => voidFires when the confirm button is clicked
placement'top' | 'bottom' | 'left' | 'right' | …topWhere the popover opens relative to the trigger
okType'primary' | 'danger'primarydanger styles the confirm as a red destructive button
iconReactNodewarningLeading warning glyph in the popover header

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/popconfirm-theme';   // registers <popconfirm>

Agent feed for this component (absolute, fetchable anywhere): popconfirm.agent.json · popconfirm.md · popconfirm.llms.txt

When to use

When to use
  • Popconfirm — a low-risk, reversible action needs a quick inline check (delete a row, discard a draft)
  • Modal — a destructive or irreversible action needs a deliberate, focused confirmation
  • no confirm — the action is trivial and easily undone — prefer an undo toast
Reserve Popconfirm for low-risk, reversible actions — anchor it to the trigger and keep the question to one line. A destructive or irreversible action (delete account, publish) needs a Modal (see the overlays pattern), never a popover.
Surfaces
editor dashboard settings

Spec

Popover white · radius 8 · elevated · Confirm primary Button #6A1EBB · white label · Cancel default Button · 1px #E3E3E3 border · #1A1A1A label · Title #1A1A1A, one short question · Anchor pops from the trigger; not a full modal · Placement top · bottom · left · right (arrow tracks the trigger) · Danger okType="danger" → red confirm #F5222D for a heavier delete