AhaSlides Design
v0.52.0React · Vue · Lit

Patterns · AhaSlides surfaces

CSAT

The shared thumbs up/down satisfaction prompt — the one CSAT control, not a bespoke rating.

Examples

State
Binary satisfaction · borderless single row — unrated · rated up · rated down · thank-you
Thumbs-down → feedback popover — click the down thumb to open the free-text follow-up

API

PropTypeDefaultNotes
promptstringOptional question shown before the thumbs
sourcestringStable placement token for analytics — passed in the rate and feedback events
valueup | downThe current rating (also reflects a click); syncs the selected thumb's aria-pressed
thanksstringOpt-in thank-you line — shown (role=status) after rating (on down, after feedback submit); fades in on a persistent node
feedback-promptstringWhat could be better?Heading shown at the top of the thumbs-down feedback popover
feedback-placeholderstringTell us more (optional)Placeholder for the free-text field in the feedback popover

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

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

When to use

When to use
  • CSAT — a lightweight satisfaction check on a feature or a piece of content
  • Result — a full-block outcome after an operation
  • a Form — you need structured, multi-field feedback with validation
Use the shared control — never build a bespoke rating. Always pass a stable `source` per placement so segmentation stays typo-proof. Keep it to the binary thumbs; free-text is asked for ONLY after a thumbs-down (the built-in feedback popover), and never block rendering on tracking.
Surfaces
editor dashboard audience

Spec

Layout borderless single row (21px high): 14px #4A4A4A prompt + 16px thumb icons, no chrome — the only layout (legacy `inline` is a no-op) · Rest icon #8A8A8A · Hover scale 1.12 · icon primary #6A1EBB (motion tokens) · Selected icon primary #6A1EBB · aria-pressed synced · Thumbs-up rates instantly — reflects value='up', emits `rate` · Thumbs-down registers value='down' + emits `rate`, then opens a feedback popover (shared <aha-popover>, role=dialog · Esc/outside-click close) anchored to the down thumb — a prompt, an <aha-counted-textarea> and a primary Send button; dismissing keeps the down rating · Thank-you opt-in `thanks` — check + success #16C49A line fades in (motion tokens): instantly on up, after feedback submit on down · Events `rate` → { rating: 'up' | 'down', source } · `feedback` → { rating: 'down', source, feedback }