---
title: "Reaction Picker"
description: "A reaction button whose tray grows out of it in colour; the one you pick arcs onto the button, which catches it with a burst as the count rolls."
category: "Micro Interactions"
publishedAt: "2026-11-16"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/micro-interactions/reaction-picker"
markdown: "https://beui.dev/micro-interactions/reaction-picker.md"
license: "MIT"
---

# Reaction Picker

> A reaction button whose tray grows out of it in colour; the one you pick arcs onto the button, which catches it with a burst as the count rolls.

## Install

```bash
npx shadcn@latest add @beui/reaction-picker
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { ReactionPicker } from "@/components/motion/reaction-picker";

export function ReactionPickerUsage() {
  return (
    <div className="pt-12">
      <ReactionPicker count={24} />
    </div>
  );
}
```

## API Reference

### ReactionPicker

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `reactions` | `Reaction[]` | — | No | The choices, in order. Defaults to like, love, haha, fire and party. |
| `value` | `string \| null` | — | No | The viewer's reaction id, or null for none. |
| `defaultValue` | `string \| null` | `null` | No | The initial reaction id when uncontrolled. Default: null |
| `onValueChange` | `((value: string \| null) => void)` | — | No | Called with the picked reaction id, or null when the same one is picked again. |
| `count` | `number` | `0` | No | Reactions from everyone else. The viewer's own is added on top. |
| `labels` | `Partial<{ react: string; reacted: string; reactions: string; like: string; love: string; haha: string; fire: string; party: string; }>` | — | No | Override any built-in string, e.g. for translation. |
| `sound` | `boolean` | `false` | No | Play open and close swishes for the tray and a select on a pick. Off by default; a `SoundProvider` can mute it app-wide. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## Types

### Reaction

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Unique key, used as the picker's value. |
| `label` | `string` | Yes | Name shown above the reaction on hover and used as its accessible name. |
| `icon` | `ReactNode` | Yes | Icon or emoji in the tray, which flies to the trigger once picked. |
| `color` | `string` | No | Text colour class for the icon, e.g. "text-rose-500". |
| `tint` | `string` | No | Classes for the button once this reaction is picked. |

## About Reaction Picker

Reaction Picker is a React reaction control built with Framer Motion. Pressing the button grows a tray out of it with each reaction rising in turn, each in its own colour; hovering or focusing one lifts it and shows its name. The one you pick arcs down onto the button, which catches it with a pop and a burst of sparks in the reaction's colour while the pill takes on that colour and the count rolls. Picking it again takes it back. It ships with like, love, haha, fire and party, or takes your own icons and colours.

### When to use it

- A message, comment or post takes quick reactions.
- A changelog or doc page asks how readers feel about it.
- A team tool lets people acknowledge an update.

### Accessibility

The button reports aria-expanded and is named Add reaction, or Reacted with Love once you have. The tray is a group of named buttons with aria-pressed; arrow keys move between them, Escape or a click outside closes it, and focus returns to the button. With reduced motion nothing rises or flies.

### FAQ

**Can I use my own reactions?**

Yes. Pass reactions, an array of { id, label, icon, color, tint }. color is the icon's text colour class and tint the classes the button takes once that reaction is picked. Any icon works, including your own SVGs.

**Does count include the viewer?**

No. count is everyone else's reactions; the viewer's own is added while they have one.

## Source

- Registry detail: https://beui.dev/r/reaction-picker
- Raw source: https://beui.dev/r/reaction-picker/raw
- GitHub: https://github.com/starc007/ui-components
