# Reactions (Notchset): prompt.md (v2.0.0)

- id: `reactions` · version 2.0.0 · component · pro (Pro)
- category: Inbox
- build: one set of files for every shadcn style
- install: `npx shadcn@latest add @notchset-pro/reactions`
- npm dependencies: lucide-react@^1
- registry dependencies: utils, https://notchset.dev/r/notchset-foundation.json, @notchset/avatar, @notchset/emoji-picker, @notchset/popover, @notchset/tooltip
- docs: https://notchset.dev/components/reactions
- The install command carries everything this item needs (files, CSS, tokens, npm and registry dependencies). Prefer it to copying source by hand.

A message acknowledged in one tap. Each reaction is a chip that says who felt what and is the button to agree; yours is the one Signature chip. The face offers a set, then any emoji. A pick flies to its chip and acts out its meaning; the count rolls; the tip shows faces and names; a chip at 0 leaves and the gap closes..

## Build it
- Stack: React 18.3 or 19, TypeScript, Tailwind CSS v4 utility classes on the foundation's roles, a components.json (imports use its aliases).
- Packages: `lucide-react@^1` beyond `react` and `react-dom`.
- Files: `components/ui/notchset/reactions.tsx`; shared code: `lib/notchset/feedback.ts`, `lib/notchset/glide.ts`, `lib/notchset/icons.ts`, `lib/notchset/motion.ts`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `notchset-foundation`, `avatar`, `emoji-picker`, `popover`, `tooltip`.
- Builds: one set of files, the same for every shadcn style.
- Exports to keep: `Reactions`, `REACTIONS_LABELS`, `EMOJI_PACK`, and every exported type.
- CSS: the install adds the notchset foundation (its roles, keyframes and motion switch, reading your shadcn tokens for colour) to your global stylesheet once. Nothing to import by hand.
- Re-running `add` (or `--overwrite`) re-applies those rules: put overrides in your own CSS, never in the installed rules.
- Colours: every part reads the foundation's roles (`--ns-canvas`, `--ns-ink`, `--ns-line`, `--ns-signal` …), which read your shadcn tokens (`--background`, `--foreground`, `--border`, `--destructive` …), plus the optional `--success` and `--warning`. Retheme on `:root` or any container; never add Tailwind colour classes inside the component.
- This item reads `--ns-bad`, `--ns-ease`, `--ns-ease-move`, `--ns-ease-pop`, `--ns-ease-spring`, `--ns-emoji-md`, `--ns-emoji-sm`, `--ns-hover`, `--ns-ink`, `--ns-ink-2`, `--ns-ink-3`, `--ns-leading`, `--ns-line`, `--ns-panel`, `--ns-signal`, `--ns-signal-ink`, `--ns-signal-wash`, `--ns-slab`, `--ns-text-small`, `--ns-time-color`, `--ns-time-panel`, `--ns-time-spring`, `--ns-weight-medium`.
- Retune it (on any ancestor) with the foundation's roles and hooks: `--ns-agent-b`, `--ns-agent-c`, `--ns-agent-d`, `--ns-agent-drift`, `--ns-agent-fill`, `--ns-agent-h1`, `--ns-agent-h2`, `--ns-agent-h3`, `--ns-agent-shift`, `--ns-avatar-card`, `--ns-avatar-lg`, `--ns-avatar-md`, `--ns-avatar-sm`, `--ns-avatar-xs`, `--ns-bad`, `--ns-bad-ink`, `--ns-band`, `--ns-band-edge`, `--ns-band-grade`, `--ns-band-optimal`, `--ns-banner-beat`, `--ns-banner-radius`, `--ns-beat`, `--ns-beat-ease`, `--ns-bezel`, `--ns-bloom-close`, `--ns-bloom-open`, `--ns-bloom-rise`, `--ns-btn-bad`, `--ns-btn-bad-hover`, `--ns-btn-bad-line`, `--ns-btn-bezel`, `--ns-btn-chosen`, `--ns-btn-gone`, `--ns-btn-morph`, `--ns-btn-ok`, `--ns-btn-press`, `--ns-btn-release`, `--ns-btn-result`, `--ns-btn-roll`, `--ns-btn-stagger`, `--ns-btn-stagger-step`, `--ns-btn-tick`, `--ns-btn-tonal`, `--ns-btn-tonal-edge`, `--ns-btn-tonal-hover`, `--ns-bulk-clear`, `--ns-button`, `--ns-button-field-inset`, `--ns-button-lg`, `--ns-button-sm`, `--ns-canvas`, `--ns-card-tilt`, `--ns-cat-1`, `--ns-cat-2`, `--ns-cat-3`, `--ns-cat-4`, `--ns-cat-5`, `--ns-cat-6`, `--ns-check`, `--ns-check-round`, `--ns-cheer-1`, `--ns-cheer-2`, `--ns-cheer-3`, `--ns-cheer-edge`, `--ns-cheer-fold`, `--ns-cheer-glow`, `--ns-cheer-lift`, `--ns-chip`, `--ns-chip-pick`, `--ns-control`, `--ns-control-lg`, `--ns-control-pad`, `--ns-control-sm`, `--ns-corner`, `--ns-danger`, `--ns-deep`, `--ns-deep-ink`, `--ns-deep-ink-2`, `--ns-deep-line`, `--ns-depth-card`, `--ns-depth-lift`, `--ns-depth-surface`, `--ns-dialog`, `--ns-dialog-grow`, `--ns-dialog-lg`, `--ns-dialog-max`, `--ns-dialog-shrink`, `--ns-dialog-sm`, `--ns-dialog-top`, `--ns-dock-bottom`, `--ns-drop`, `--ns-ease`, `--ns-ease-arrive`, `--ns-ease-breathe`, `--ns-ease-drum`, `--ns-ease-exit`, `--ns-ease-fling`, `--ns-ease-glide`, `--ns-ease-grow`, `--ns-ease-move`, `--ns-ease-panel`, `--ns-ease-pop`, `--ns-ease-press`, `--ns-ease-spring`, `--ns-ebg-arm`, `--ns-ebg-lit`, `--ns-emoji`, `--ns-emoji-md`, `--ns-emoji-sm`, `--ns-field`, `--ns-field-edge`, `--ns-field-h`, `--ns-fill`, `--ns-fill-time`, `--ns-flood-arc`, `--ns-flood-aurora`, `--ns-flood-behind-1`, `--ns-flood-behind-2`, `--ns-flood-bloom`, `--ns-flood-deep`, `--ns-flood-dial-bloom`, `--ns-flood-glass`, `--ns-flood-grain`, `--ns-flood-image`, `--ns-flood-ink`, `--ns-flood-ink-low`, `--ns-flood-light`, `--ns-flood-mid`, `--ns-flood-pale`, `--ns-flood-pane`, `--ns-flood-pane-edge`, `--ns-flood-pill-ink`, `--ns-flood-ribbon`, `--ns-flood-ribbon-core`, `--ns-flood-shadow`, `--ns-flood-sheen`, `--ns-flood-wash`, `--ns-font-body`, `--ns-font-display`, `--ns-font-mono`, `--ns-font-script`, `--ns-glass`, `--ns-glass-blur`, `--ns-glass-shadow`, `--ns-glow`, `--ns-glyph-pad`, `--ns-grain`, `--ns-gutter`, `--ns-header`, `--ns-help-max`, `--ns-hit`, `--ns-hover`, `--ns-icon`, `--ns-icon-lg`, `--ns-icon-sm`, `--ns-icon-stroke`, `--ns-info`, `--ns-info-ink`, `--ns-ink`, `--ns-ink-2`, `--ns-ink-3`, `--ns-ink-4`, `--ns-layer-bar`, `--ns-layer-modal`, `--ns-layer-panel`, `--ns-layer-popup`, `--ns-layer-sticky`, `--ns-layer-tip`, `--ns-layer-toast`, `--ns-layer-zoom`, `--ns-lead-body`, `--ns-lead-figure`, `--ns-lead-large`, `--ns-lead-meta`, `--ns-lead-small`, `--ns-lead-sub`, `--ns-lead-title`, `--ns-leading`, `--ns-leading-prose`, `--ns-leading-title`, `--ns-lift`, `--ns-light-1`, `--ns-light-2`, `--ns-light-3`, `--ns-light-spread`, `--ns-light-strength`, `--ns-line`, `--ns-line-soft`, `--ns-lit-edge`, `--ns-map-grass`, `--ns-map-water`, `--ns-mark-edge`, `--ns-mark-lifted`, `--ns-mark-rest`, `--ns-mark-swap`, `--ns-marker`, `--ns-marker-ink`, `--ns-mc-place`, `--ns-mc-roll`, `--ns-measure`, `--ns-menu-dy`, `--ns-menu-lit`, `--ns-menu-pad`, `--ns-menu-row`, `--ns-menu-rule`, `--ns-mesh`, `--ns-mesh-frost`, `--ns-nest-inset`, `--ns-nest-outer`, `--ns-nest-r`, `--ns-notch-ease`, `--ns-ok`, `--ns-ok-ink`, `--ns-on-fill`, `--ns-orb-body`, `--ns-orb-cool`, `--ns-orb-core`, `--ns-orb-dawn`, `--ns-orb-deep`, `--ns-orb-edge`, `--ns-orb-grain`, `--ns-orb-ground`, `--ns-orb-halo`, `--ns-orb-inner`, `--ns-orb-key`, `--ns-orb-lift`, `--ns-orb-limb`, `--ns-orb-limb-from`, `--ns-orb-rim`, `--ns-orb-skin-hi`, `--ns-orb-skin-lo`, `--ns-orb-skin-mid`, `--ns-orb-warm`, `--ns-palette-min`, `--ns-panel`, `--ns-panel-room`, `--ns-panel-w`, `--ns-panel-w-lg`, `--ns-pick-slot`, `--ns-pill-prop`, `--ns-play-fill`, `--ns-play-fill-color`, `--ns-play-lift`, `--ns-play-lift-y`, `--ns-play-open`, `--ns-play-open-content`, `--ns-play-press`, `--ns-play-press-box`, `--ns-play-reduced`, `--ns-play-ring`, `--ns-play-roll`, `--ns-play-shake`, `--ns-play-spring`, `--ns-play-swap`, `--ns-play-swap-blur`, `--ns-press-min`, `--ns-press-scale`, `--ns-press-x`, `--ns-press-y`, `--ns-primary-hover`, `--ns-primary-press`, `--ns-prism-edge`, `--ns-prism-glint`, `--ns-prism-sheen`, `--ns-prism-tint`, `--ns-pulse`, `--ns-radius`, `--ns-radius-2xl`, `--ns-radius-button`, `--ns-radius-button-lg`, `--ns-radius-button-sm`, `--ns-radius-card`, `--ns-radius-check`, `--ns-radius-control`, `--ns-radius-control-sm`, `--ns-radius-float`, `--ns-radius-full`, `--ns-radius-lg`, `--ns-radius-mark`, `--ns-radius-menu-row`, `--ns-radius-modal`, `--ns-radius-pill`, `--ns-radius-sm`, `--ns-radius-xl`, `--ns-radius-xs`, `--ns-raised`, `--ns-ramp-1`, `--ns-ramp-2`, `--ns-ramp-3`, `--ns-ramp-4`, `--ns-ramp-5`, `--ns-ramp-shine`, `--ns-range`, `--ns-rest-1`, `--ns-rest-2`, `--ns-rest-3`, `--ns-rise`, `--ns-row`, `--ns-row-compact`, `--ns-row-hue`, `--ns-scrim`, `--ns-search-h`, `--ns-segment`, `--ns-segment-inset`, `--ns-segment-lift`, `--ns-segment-sm`, `--ns-selected`, `--ns-series`, `--ns-series-core`, `--ns-series-glint`, `--ns-series-tint`, `--ns-shadow-dialog`, `--ns-shadow-float`, `--ns-shadow-lift`, `--ns-shadow-panel`, `--ns-sheet`, `--ns-sheet-back`, `--ns-sheet-bottom`, `--ns-sheet-drop`, `--ns-sheet-rise`, `--ns-shift`, `--ns-side`, `--ns-signal`, `--ns-signal-ink`, `--ns-signal-wash`, `--ns-sk-figure`, `--ns-sk-land`, `--ns-sk-p`, `--ns-sk-p0`, `--ns-sk-p1`, `--ns-sk-p2`, `--ns-sk-p3`, `--ns-sk-p4`, `--ns-sk-p5`, `--ns-sk-p6`, `--ns-sk-p7`, `--ns-sk-read`, `--ns-sk-sweep`, `--ns-skeleton`, `--ns-skeleton-bone`, `--ns-skeleton-bone-light`, `--ns-skeleton-light`, `--ns-slab`, `--ns-slab-edge`, `--ns-slab-ink`, `--ns-sleep-awake`, `--ns-sleep-deep`, `--ns-sleep-light`, `--ns-sleep-rem`, `--ns-space-1`, `--ns-space-2`, `--ns-space-3`, `--ns-space-4`, `--ns-space-5`, `--ns-space-6`, `--ns-space-8`, `--ns-space-section`, `--ns-stack-fan`, `--ns-stack-fan-gap`, `--ns-stack-fan-lag`, `--ns-stack-on`, `--ns-stagger-item`, `--ns-stagger-mark`, `--ns-stagger-max`, `--ns-standing-critical`, `--ns-standing-in`, `--ns-standing-out`, `--ns-state-doing`, `--ns-state-done`, `--ns-state-review`, `--ns-state-todo`, `--ns-step`, `--ns-step-from`, `--ns-step-sign`, `--ns-swipe-surface`, `--ns-switch-h`, `--ns-switch-w`, `--ns-text-body`, `--ns-text-control`, `--ns-text-control-lg`, `--ns-text-display`, `--ns-text-editorial`, `--ns-text-empty`, `--ns-text-figure`, `--ns-text-giant`, `--ns-text-heading`, `--ns-text-headline`, `--ns-text-input`, `--ns-text-large`, `--ns-text-lede`, `--ns-text-meta`, `--ns-text-record`, `--ns-text-sentence`, `--ns-text-small`, `--ns-text-sub`, `--ns-text-title`, `--ns-theme-fade`, `--ns-tile-shadow`, `--ns-time-born`, `--ns-time-color`, `--ns-time-confirm`, `--ns-time-dialog`, `--ns-time-fling`, `--ns-time-flip`, `--ns-time-glide`, `--ns-time-grow`, `--ns-time-hold`, `--ns-time-menu`, `--ns-time-page`, `--ns-time-panel`, `--ns-time-quick`, `--ns-time-roll`, `--ns-time-settle`, `--ns-time-snap`, `--ns-time-spin`, `--ns-time-spring`, `--ns-time-sweep`, `--ns-time-toast`, `--ns-tint`, `--ns-tint-c`, `--ns-tint-ease`, `--ns-tint-fill`, `--ns-tint-gap`, `--ns-tint-h1`, `--ns-tint-h2`, `--ns-tint-h3`, `--ns-tint-ink`, `--ns-tint-row`, `--ns-tip-fold`, `--ns-tip-grow`, `--ns-toast-bottom`, `--ns-toast-gap`, `--ns-toast-left`, `--ns-toast-lift`, `--ns-toast-peek`, `--ns-toast-scale`, `--ns-toast-w`, `--ns-touch`, `--ns-tracking-body`, `--ns-tracking-caps`, `--ns-tracking-control`, `--ns-tracking-display`, `--ns-tracking-headline`, `--ns-tracking-sub`, `--ns-tracking-title`, `--ns-warn`, `--ns-warn-ink`, `--ns-wash-clay`, `--ns-wash-dusk`, `--ns-wash-graphite`, `--ns-wash-ink`, `--ns-wash-sage`, `--ns-wash-sand`, `--ns-weight-light`, `--ns-weight-medium`, `--ns-weight-regular`, `--ns-weight-strong`, `--ns-well`, `--ns-width-lg`, `--ns-width-md`, `--ns-width-sm`, `--ns-width-xl`.
- Never add Tailwind colour classes inside the component.

```tsx
import { Avatar } from "@/components/ui/notchset/avatar";
```

## Parts
- A single export that takes props.

## Match the original
- Read `components/ui/notchset/reactions.tsx` as the reference implementation before changing or recreating anything, and match it: sizes, colours per theme, motion timings, copy and behaviour.
- If you deviate (a prop you can't honour, a style you changed, a dependency you swapped), say so in your reply, part by part.
- Keep the accessibility contract, the keyboard map and the motion levels listed below.

## Use it when
- Agreeing with or acknowledging a message without replying.

### Not when
- Picking any emoji to type is the emoji picker; a vote with a result is a poll.

## Built from
- avatar (`avatar`), installed with it: reuse it, don't rebuild it
- emoji-picker (`emoji-picker`), installed with it: reuse it, don't rebuild it
- popover (`popover`), installed with it: reuse it, don't rebuild it
- tooltip (`tooltip`), installed with it: reuse it, don't rebuild it
- Feedback (shared helper, ships with it)
- Glide (shared helper, ships with it)
- Icons (shared helper, ships with it)
- Motion (shared helper, ships with it)

## Mistakes
- One cluster with a total: it hides which reaction you would join
- Painting every chip in the Signature: only yours
- Pulsing on every render: once, for your tap

## Usage

```tsx
"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
import { Avatar } from "@/components/ui/notchset/avatar";
import type { FeedbackProps } from "@/lib/notchset/feedback";
import { useLessMotion } from "@/lib/notchset/motion";
import { EMOJI_PACK, Reactions, type Reaction } from "@/components/ui/notchset/reactions";
import { pressIn, useSelfPlay } from "./self-play";

/*
 * Reactions in two looks, the emoji drawn from the pack. Burst, for a public post's reaction row: on first sight a
 * hand presses Party once: the emoji springs out of its chip, eight copies rise and fade, one ring goes out, and the
 * count rolls up; taking yours back rolls it down. Plain, the app's row under one message: on first sight a heart is
 * added, it beats once and the count rolls 2 to 3. In both the face opens the set; a pick lands as a new chip.
 */
const SET = Object.keys(EMOJI_PACK);
const FACES: Record<string, string> = {
  "Priya Raman": "https://notchset.dev/media/people/person-01.webp",
  "Kevin Ito": "https://notchset.dev/media/people/person-08.webp",
  "Ana Ruiz": "https://notchset.dev/media/people/person-05.webp",
  "Ines Duarte": "https://notchset.dev/media/people/person-07.webp",
  You: "https://notchset.dev/media/people/person-03.webp",
};
const WORDS = {
  post: { tag: "New", date: "Changelog · November 12, 2026", title: "Dark mode, everywhere", body: "Every page now follows your system’s theme. Prefer one look? Pick it once in Settings." },
  message: { name: "Priya Raman", time: "10:12", body: "The new onboarding is live. Thank you to everyone who tested it this week." },
};

const toggle = (emoji: string) => (l: Reaction[]) => {
  const r = l.find((x) => x.emoji === emoji);
  if (!r) return [...l, { emoji, count: 1, mine: true, who: ["You"] }];
  return l.map((x) => (x.emoji !== emoji ? x : x.mine ? { ...x, count: x.count - 1, mine: false, who: x.who?.filter((w) => w !== "You") } : { ...x, count: x.count + 1, mine: true, who: [...(x.who ?? []), "You"] })).filter((x) => x.count > 0);
};

/* the press on arrival: one chip, once */
function useArrival(root: React.RefObject<HTMLDivElement | null>, emoji: string) {
  const less = useLessMotion();
  const play = useSelfPlay(root, { beats: [600], off: less });
  React.useEffect(() => {
    if (play.mine || play.step !== 0) return;
    pressIn(root.current, `[data-row="${emoji}"]`);
  }, [play.step, play.mine, root, emoji]);
  return (e: React.SyntheticEvent) => e.nativeEvent.isTrusted && play.handOver();
}

export default function ReactionsDemo() {
  const look = "burst" as "burst" | "plain";
  const words = WORDS;
  return look === "plain" ? <Plain words={words} /> : <Burst words={words} />;
}

type Look = { words: typeof WORDS; onFeedback?: FeedbackProps["onFeedback"] };

function Burst({ words, onFeedback: sound }: Look) {
  const root = React.useRef<HTMLDivElement>(null);
  const [list, setList] = React.useState<Reaction[]>([
    { emoji: "👍", count: 124 },
    { emoji: "❤️", count: 86 },
    { emoji: "🎉", count: 48 },
  ]);
  const handOver = useArrival(root, "🎉");
  return (
    <div ref={root} onPointerDownCapture={handOver} onKeyDownCapture={handOver} className="w-[720px] max-w-full">
      <article className="flex flex-col gap-5 rounded-[28px] bg-[var(--ns-raised)] p-6 shadow-[var(--ns-bezel),0_30px_60px_-40px_rgb(0_0_0/0.35)] max-sm:gap-4 max-sm:rounded-[22px] max-sm:p-4">
        <header className="flex flex-col gap-2">
          <p className="m-0 flex items-center gap-2 text-[13px] text-[var(--ns-ink-3)]">
            <span className="rounded-full bg-[color-mix(in_oklab,var(--ns-signal)_12%,transparent)] px-2 py-0.5 text-[12px] font-[number:var(--ns-weight-medium)] text-[var(--ns-signal-ink)]">{words.post.tag}</span>
            {words.post.date}
          </p>
          <h3 className="m-0 font-[family-name:var(--ns-font-display)] text-[32px] leading-[1.1] font-[number:var(--ns-weight-strong)] tracking-[-0.025em] text-[var(--ns-ink)] max-sm:text-[24px]">{words.post.title}</h3>
        </header>
        <Art />
        <p className="m-0 text-[16px] leading-6 text-[var(--ns-ink-2)] max-sm:text-[15px]">{words.post.body}</p>
        <Reactions look="burst" images={EMOJI_PACK} set={SET} reactions={list} onToggle={(e) => setList(toggle(e))} onFeedback={sound} className="gap-2.5 max-sm:gap-2" />
      </article>
    </div>
  );
}

function Plain({ words, onFeedback: sound }: Look) {
  const root = React.useRef<HTMLDivElement>(null);
  const [list, setList] = React.useState<Reaction[]>([
    { emoji: "👍", count: 4, who: ["Kevin Ito", "Ana Ruiz", "Ines Duarte", "Lena Ortiz"] },
    { emoji: "❤️", count: 2, who: ["Kevin Ito", "Ana Ruiz"] },
  ]);
  const handOver = useArrival(root, "❤️");
  return (
    /* the app's row at its true shape, shown enlarged on the stage */
    <div ref={root} onPointerDownCapture={handOver} onKeyDownCapture={handOver} className="flex justify-center">
      <div className="flex w-[420px] max-w-full gap-3">
        <Avatar name={words.message.name} src={FACES[words.message.name]} size="sm" />
        <div className="flex min-w-0 flex-1 flex-col gap-1">
          <p className="m-0 flex items-baseline gap-2 text-[length:var(--ns-text-body)]">
            <b className="font-[number:var(--ns-weight-medium)] text-[var(--ns-ink)]">{words.message.name}</b>
            <span className="text-[length:var(--ns-text-meta)] text-[var(--ns-ink-3)] tabular-nums">{words.message.time}</span>
          </p>
          <p className="m-0 text-[length:var(--ns-text-body)] leading-[var(--ns-lead-body)] text-[var(--ns-ink)]">{words.message.body}</p>
          <Reactions images={EMOJI_PACK} set={SET} faces={FACES} reactions={list} onToggle={(e) => setList(toggle(e))} onFeedback={sound} className="mt-1.5" />
        </div>
      </div>
    </div>
  );
}

/* the post's artwork: one window, light on the left and dark on the right, split on a slant */
function Art() {
  const pane = (dark: boolean) => (
    <div className={cn("absolute inset-0 flex flex-col gap-3 p-6 max-sm:p-4", dark ? "bg-[#17171b]" : "bg-[#f4f4f1]")} style={dark ? { clipPath: "polygon(58% 0, 100% 0, 100% 100%, 42% 100%)" } : undefined}>
      <div className="flex items-center gap-1.5">
        {[0, 1, 2].map((i) => (
          <span key={i} className={cn("size-2.5 rounded-full", dark ? "bg-white/18" : "bg-black/12")} />
        ))}
      </div>
      <div className="flex flex-1 gap-3">
        <div className={cn("flex w-[26%] flex-col gap-2 rounded-[10px] p-3", dark ? "bg-white/6" : "bg-black/[.04]")}>
          {[70, 52, 60, 44].map((w) => (
            <span key={w} className={cn("h-2 rounded-full", dark ? "bg-white/16" : "bg-black/10")} style={{ width: `${w}%` }} />
          ))}
        </div>
        <div className="flex flex-1 flex-col gap-3">
          <span className={cn("h-16 rounded-[12px] max-sm:h-8", dark ? "bg-[linear-gradient(135deg,#3a4fd9,#7b5cf0)]" : "bg-[linear-gradient(135deg,#c7d0ff,#e3d8ff)]")} />
          <div className="grid flex-1 grid-cols-3 gap-3">
            {[0, 1, 2].map((i) => (
              <span key={i} className={cn("rounded-[10px]", dark ? "bg-white/7" : "bg-black/[.05]")} />
            ))}
          </div>
        </div>
      </div>
    </div>
  );
  return (
    <div aria-hidden className="relative h-[250px] overflow-hidden rounded-[18px] shadow-[inset_0_0_0_1px_var(--ns-line)] max-sm:h-[150px]">
      {pane(false)}
      {pane(true)}
    </div>
  );
}
```

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `reactions` | `Reaction[]` |  | Required. |
| `onToggle` | `(emoji: string) => void` |  | a reaction tapped: add yours, or take it back |
| `set` | `string[]` | `["👍", "❤️", "🎉", "👀", "✅", "🙏"]` | the quick set the face offers first |
| `faces` | `Record<string, string>` |  | photos for the names in `who`, shown as faces in a chip's tip |
| `labels` | `Partial<typeof REACTIONS_LABELS>` |  | its words, English by default |
| `images` | `Record<string, EmojiImage>` |  | emoji drawn as pictures (`EMOJI_PACK`); one not in the map stays text |
| `look` | `"plain" \| "burst"` | `"plain"` | "plain" (the default): the app's chips; "burst": a public post's row, larger, a press bursts the emoji |
| `onFeedback` | `(e: FeedbackEvent) => void` |  | called once per move, for your sound or haptics |

Full docs: https://notchset.dev/components/reactions

## Customising
- Colours: every part reads the foundation's roles (`--ns-canvas`, `--ns-ink`, `--ns-line`, `--ns-signal` …), which read your shadcn tokens (`--background`, `--foreground`, `--border`, `--destructive` …), plus the optional `--success` and `--warning`. Retheme on `:root` or any container; never add Tailwind colour classes inside the component.
- Dark mode follows the `.dark` class or `data-theme="dark"` on an ancestor (the shadcn and next-themes conventions).
- Update later: Commit or stash local changes first (or copy the files), so the update can be undone. Read https://notchset.dev/r/changelog.json for the new versions: a major version, an entry marked breaking or a merge says what to change. Then re-run the install with `--overwrite`, on a branch. It replaces the component's files, the shared helper files they import, and the item's CSS rules in the global stylesheet, so review the whole diff (components, shared files, CSS), re-apply your own edits, and run the app's typecheck, tests and build.

## Keyboard

| Keys | Action |
|---|---|
| Tab, Enter or Space | add or take back a reaction |
| Enter on the face | the set |
| Esc | close the set |

## Performance

- A few buttons; a flight is one Web Animation on a temporary glyph, removed when it lands.

## Responsive

- phone: the set as a sheet
- desktop
- dark (tokens)
- reduced motion: counts and chips change in place

## Motion inventory

| Interaction | What moves |
|---|---|
| yours added: laughter wobbles, the party tilts, eyes look, the flame flares | ns-react-wobble, ns-react-party, ns-react-peek, ns-react-flare, 460-520ms. Reduced motion: no act (data-ns-still). |
| a pick flies from the set to its chip | transform on --ns-time-snap, --ns-ease-move. Reduced motion: no flight. |
| a new chip pops in | ns-chip-in on --ns-time-spring, --ns-ease-pop (data-ns-moves). Reduced motion: a fade. |
| yours added: the emoji acts out its meaning (thumb lifts, laughter wobbles, party tilts, eyes look, fire flares; others pop) | ns-react-thumb, -wobble, -party, -peek, -flare, or ns-pop (data-ns-still). Reduced motion: still. |
| a heart added: it beats twice, a ring opens and six small hearts float up off the chip | ns-heart-beat, ns-heart-ring, ns-heart-rise (data-ns-still). Reduced motion: still; no hearts. |
| the set fans out of the face, each emoji after the one before it | ns-fan-in, 35ms apart (data-ns-moves). Reduced motion: a fade. |
| the count rolls | RollingNumber. Reduced motion: lands at once. |
| a chip that leaves: its neighbours close the gap | transform on --ns-time-panel, --ns-ease-move. Reduced motion: they move at once. |

## Accessibility contract (preserve when editing)
- A named group; each chip is a toggle button (aria-pressed) named by its emoji, count and who, yours said; the face opens the set, each emoji a button named by itself, and + opens the picker.

## Install

```bash
# npm
npx shadcn@latest add @notchset-pro/reactions
# pnpm
pnpm dlx shadcn@latest add @notchset-pro/reactions
# yarn
yarn dlx shadcn@latest add @notchset-pro/reactions
# bun
bunx --bun shadcn@latest add @notchset-pro/reactions
```

Pro item: needs the `@notchset-pro` registry in `components.json` and `NOTCHSET_TOKEN` in `.env.local` (https://notchset.dev/account). Setup: https://notchset.dev/docs/pro. Every components.json `style` gets the same files.

### Manual

1. Install the packages: `npm install lucide-react@^1`.
2. Copy `components/ui/notchset/reactions.tsx`, `lib/notchset/feedback.ts`, `lib/notchset/glide.ts`, `lib/notchset/icons.ts`, `lib/notchset/motion.ts` from https://notchset.dev/r/pro/reactions.json, sent with the header `Authorization: Bearer ${NOTCHSET_TOKEN}` (each file's `content`, at its `target`), keeping the `@/` path alias of your tsconfig.
3. Add what it builds on: shadcn `utils` (cn), `notchset-foundation`, `avatar`, `emoji-picker`, `popover`, `tooltip`.

The foundation (the tokens listed above, keyframes and motion levels) installs once with the first component; its CSS is public at https://notchset.dev/r/notchset-foundation.json.
