Skip to content
caliper ui pro docs

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

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

When to use

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

When not to use

  • 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.

API reference

toggleReaction

0 props

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

ReactionBar

4 props
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โ€”

Keyboard

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

Accessibility

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

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/reaction-bar.md

The index of every part is at /llms.txt.

More in Actions