Reactions Pro
One payment, every Pro piece. $10 tomorrow.
Install
npx shadcn@latest add @mu-pro/react-bubblePro. Installs with your licence key through the @mu-pro registry; the key comes with Pro. Lands in components/mu/react-bubble/ with the shared foundation.
Usage
import { ReactBubble } from "@/components/mu/react-bubble/ReactBubble";
<ReactBubble reactions={counts} onReact={send}>
Shipping v2 tonight. Bring snacks.
</ReactBubble>Use with an agent Beta
npx shadcn@latest add @mu-pro/uisdk/react-bubbleOptional. An AI agent in your app can read and set this piece by name, and you can ask before anything it can’t undo. The piece itself doesn’t change; installs with your Pro key, like the piece. Built on UI SDK 0.1.0-beta.23, which is in beta too, so this add-on follows its releases.
Source
How it works
Building with an agent? Hand it a ready prompt for this piece.
Input and reduced motion
- Touch: press and hold the message; the beads bud in an arc above it. Slide to a bead (it swells) and let go to send it; let go anywhere else and the arc stays for a tap. Tap outside to close.
- Pointer: hold works the same; a right click opens it too, and a React key shows beside the message after a short wait.
- Keyboard: Tab to the React key (it shows on focus) and press Enter: focus moves to the first bead. Arrows move between them, Home and End jump, Enter sends, Escape closes and returns to the key.
- Again: pick your own reaction again to take it back.
- Reduced motion: the beads appear on the arc at their size, the pick lands in its count at once, and words land without the blur.
Props
| Prop | Default | What it does |
|---|---|---|
children | — | any content | the message |
options | ❤️ 😂 🔥 👏 😮 🚀 | strings | the reactions on offer, in arc order (6 fit the arc best) |
reactions | [] | { emoji, count, mine? }[] | the counts so far, and which are yours |
onReact | — | (emoji, on) => unknown | you added (on) or took back a reaction; may return a promise, and a refusal puts the count back and says so |
open / defaultOpen / onOpenChange | closed | boolean | whether the arc is open |
labels | English | see ReactBubbleLabels | every word, with {n} templates |
disabled | false | — | no hold, and the key does nothing |
sound | off | true or 0–1 | a peel as the beads bud and a stick as the pick lands |
className | — | — | added to the root |
Sound
None. It loads in silence.
Off unless you pass sound (true, or a volume 0–1). A peel as the beads bud (from your hold, your key or your right click) and a stick as your pick lands in its count; never on hover, on mount or from a prop change. setMuted(true) from components/mu/sounds.ts silences every cottoncandy item at once.
Licence
Included with Pro: use it in unlimited end products for you and your clients; no reselling as a kit. See the licence.
Press and hold a message: reaction beads bud out in an arc, and the one you pick drips into a count.
For message reactions in chatMore in Messaging