AhaSlides Design
v0.52.0React · Vue · Lit

Components · Overlays

Popover

Anchor a floating card of rich content — a title, a body, and an optional arrow — to a trigger.

Examples

Placement
Trigger
Popover · title + content · placement · trigger · arrow · click the trigger

Share, rename or export this deck.

Manage access

API

PropTypeDefaultNotes
openbooleanfalseControlled open state; reflected attribute
placementtop | bottom | left | right | top-start | top-end | bottom-start | bottom-end | left-start | left-end | right-start | right-endbottomSide the panel anchors to. The 4 cardinal values align the panel to the trigger's leading edge; the 8 edge-aligned values (…-start / …-end) pin it to the trigger's start/end edge with the arrow offset near that edge (AntD naming)
triggerclick | hover | focusclickHow the panel opens. Click closes on outside-click + Escape (focus returns); hover/focus track pointer/focus
titlestringBold header rendered above the body (hidden when empty)
contentstringText body alternative to slotted content (used when nothing is slotted)
arrowbooleanfalseShow the pointer arrow at the panel edge
[slot=trigger]slotted elementThe element that toggles the panel
open / closeCustomEventComposed events on show / hide

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/aha-popover';   // registers <aha-popover>

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

When to use

When to use
  • Popover — a small panel of rich or interactive content anchored to a control
  • Tooltip — a short, non-interactive hint on hover
  • Modal — a focused task that should block the rest of the page
Trigger on click for interactive content (Tooltip owns hover). Give it a short `title` and a one-line body; a long form belongs in a Modal. A click trigger closes on outside-click and Escape (focus returns to the trigger) — both built in.
Surfaces
editor dashboard settings

Spec

Panel bg-elevated #FFFFFF, 1px border #E3E3E3, radius 8, min-width 180 / max 280 · Elevation 0 6px 16px ink 12% · Title SemiBold 600, 14/21 text-default, 6px above the body · Body pad 12 16, 14/21 text-secondary #4A4A4A (text-default when title-less) · Placement top · bottom · left · right (8px offset), PLUS 8 edge-aligned (top-start/-end, bottom-start/-end, left-start/-end, right-start/-end) — same side, aligned to the trigger edge with the arrow offset near it · Trigger click (default) · hover · focus · Arrow optional 8px pointer at the panel edge, matches the surface + border · Motion fade + 4px directional lift on open (ease-out, persistent node)