AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Display

Badge

A small count or status marker — notification counts, unread dots, a standalone status label.

Examples

Status colour
Count
Ribbon placement
Tone chip
Plan chip
Rank chip
Count · over a wrapped child · capped as N+ · custom colour
Dot · a bare marker in each status colour
Status · a standalone semantic dot + label
Tone · filled/tinted label chips (each bound to an --aha token)
Essential Danger Success Positive Pro Branding Primary-alt
Plan · preset chips (solid brand fill · cycle · crown on pro/enterprise)
Rank · leaderboard medal chips · and Session
Clickable chip = a LINK (<a href>), not a button · hover-animates
Upgrade
Ribbon · a corner banner wrapping a card · start / end placement
Quiz template
Fresh from the gallery
Pro plan
50% off this week

API

PropTypeDefaultNotes
countnumber0The number shown in the bubble; 0 hides it unless showZero
overflowCountnumber99Cap; above it renders as N+ (alias: max)
showZerobooleanfalseKeep the bubble visible when count is 0
dotbooleanfalseRender a bare marker, no number
statussuccess | processing | error | warning | default | primaryerrorSemantic colour; with `text` (no count/dot) renders a standalone dot + label
textstringLabel for a standalone status badge
colorCSS colourCustom colour overriding the semantic default
ribbonbooleanfalseWrap the slotted child (a card) with a corner ribbon banner; `text` is the label, colour from color/status (default primary)
placementstart | endendRibbon corner: end = top-right (default), start = top-left
tonedanger | success | positive | essential | pro | branding | primary-altFilled/tinted LABEL chip; each tone binds bg + fg to an --aha-* token
planfree | edu | essential | pro | enterprisePlan preset chip (solid brand fill); pro/enterprise lead with a crown glyph
cyclemonthly | yearlyAppended to a plan chip's default label (e.g. "Pro · Yearly")
rank1 | 2 | 3 | 4Leaderboard rank chip; medal-tinted (gold/silver/bronze) with a leading system-Medal glyph
sessionstringRenders a "Session N" chip; the value is N (slotted content / `text` overrides the label)
hrefURLMakes a tone/plan/rank/session chip a clickable LINK — renders <a class="chip" href> (native focusable, animates on hover), never a <button>. Omit for a static <span> chip

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

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

When to use

When to use
  • Badge count/dot — a count or presence marker attached to another element (a bell, a tab, an avatar)
  • Badge status — a standalone semantic state label (Published, Generating, Failed) in a list or header
  • Tag — a standalone label/keyword chip with text but no status semantics
A count/dot marks another element — wrap the element it belongs to so the pill anchors to its top-right. Keep counts meaningful; cap large numbers with overflowCount so the bubble stays small. Reserve the standalone status form for a semantic lifecycle state, and let processing pulse rather than spin a separate loader.
Surfaces
editor dashboard settings audience

Spec

Count bubble height 18 · min-width 18 · radius pill · padding 0 6 · scales in · On a child floats to the child's top-right, 1px container-colour ring · Dot 8×8, no label · Status standalone 6px dot + 14px label; processing pulses · Text Plus Jakarta SemiBold 600, 11/18, #FFFFFF · Default colour count/dot → error #F5222D; status → its semantic token; ribbon → primary #6A1EBB · Overflow / zero count > overflowCount → N+; 0 hides unless showZero · Ribbon corner banner over a wrapped card; 22px tall, radius 4, triangular fold; placement start/end · Tone chip filled/tinted pill (radius pill, 22px); danger·success·positive·essential·pro·branding·primary-alt, each bound to an --aha token · Plan chip preset (free·edu·essential·pro·enterprise); solid brand fill, cycle monthly/yearly; pro/enterprise lead with a crown · Rank chip leaderboard 1st–4th, medal-tinted (gold/silver/bronze), leading system-Medal glyph · Session chip "Session N" brand-accent pill; label from `session` / slotted text · Clickable = link with `href` renders <a class="chip"> (native focusable link, animates on hover) — never a <button>; no href = plain <span>