Skip to content
caliper ui docs

Pro

Reaction bar

Emoji reactions under a message or post. Each chip is a toggle; the count rolls and your chip settles with one small pop. The picker adds a new reaction.

Pro
pnpm dlx shadcn@latest add @caliper/reaction-bar

Changelog · 14 October

Posted in #product-updates

Maya Chen shipped invoice reminders to every workspace. Overdue invoices now nudge the customer on day 3 and day 10.

Installs components/ui/reaction-bar.tsxDepends on @radix-ui/react-popover, lucide-reactMotion none in component source

When to use

Use it for

  • Comments, chat messages, changelog entries.
  • Light feedback where a reply would be too much.

Skip it when

  • Votes that rank items; use the vote control.
  • Ratings with a scale; use the rating.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/reaction-bar

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source. It is built from toggleReaction and ReactionBar.

example.tsx
import { toggleReaction, ReactionBar } from "@/components/ui/reaction-bar"

The worked example comes with Pro

The 33-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

toggleReaction

component

No props of its own; it accepts the native props of its root element.

ReactionBar

component
PropTypeDefault
reactions *readonly Reaction[]—
onChange *(next: Reaction[]) => void—
choicesreadonly { emoji: string; label: string; }[][ { emoji: "👍", label: "Thumbs up" }, { emoji: "🎉", label: "Party" }, { emoji: "❤️", label: "Heart" }, { emoji: "👀", label: "Eyes" }, { emoji: "🚀", label: "Rocket" }, { emoji: "😄", label: "Smile" }, { emoji: "🙏", label: "Thanks" }, { emoji: "✅", label: "Done" }, ]
classNamestring—

Accessibility

It exposes group semantics, with aria-label, aria-pressed and aria-hidden kept in step with state.

Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Actions examples