ReactionPicker

ReactionPicker is an animated reaction picker component for React Native and React, from the dissolve library. iMessage style reactions: long press, dock magnifier, emoji flies to a badge.

iMessage style reactions. Long press a bubble: it lifts, a pill of emojis grows out of the press point. Slide across and the emoji under the finger magnifies like the Dock. Release on one to pick it, it flies to the bubble corner. Pick the same one again and the badge snaps into grains.

Install

React Native

Install the engine once per app and wrap the root layout in <DissolveProvider> (see Installation), then copy the component into components/dissolve:

npx expo install dissolve-ui @shopify/react-native-skia react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics
npx dissolve-ui add reaction-picker --native
npx shadcn@latest add https://dissolve.rselmi.com/r/native/reaction-picker.json

React

Needs React 19 and react-dom, nothing else: no engine, no provider, no Tailwind. Works in the Next.js App Router.

npx dissolve-ui add reaction-picker --web
npx shadcn@latest add https://dissolve.rselmi.com/r/reaction-picker.json

Usage

ReactionPicker.tsx (React Native)
import { useState } from 'react';
import { ReactionPicker } from '@/components/dissolve/reaction-picker';

export function Message({ text }) {
  const [reaction, setReaction] = useState(null);

  return (
    <ReactionPicker
      selected={reaction}
      onReact={(e) => setReaction(e === reaction ? null : e)}
    >
      <Bubble text={text} />
    </ReactionPicker>
  );
}
ReactionPicker.tsx (React)
import { useState } from 'react';
import { ReactionPicker } from '@/components/dissolve/reaction-picker';

export function Message({ text }) {
  const [reaction, setReaction] = useState(null);

  return (
    <ReactionPicker
      selected={reaction}
      onReact={(e) => setReaction(e === reaction ? null : e)}
    >
      <Bubble text={text} />
    </ReactionPicker>
  );
}

Props

PropTypeDefaultDescription
childrenReactNoderequiredThe bubble. It lifts while the picker is open.
onReact(emoji: string) => voidrequiredCalled with the chosen emoji. Picking the current one again is your cue to remove it.
reactionsstring[]['❤️', '😂', '😮', '😢', '👍', '🔥']Emojis offered in the pill.
selectedstring | nullCurrent reaction, shown as a badge on the bubble corner.
corner'top-left' | 'top-right''top-right'Corner the badge sits on. Use top-left for your own bubbles.
insets{ top?, bottom? }{ top: 60, bottom: 34 }Space kept free at the top and bottom of the window (safe area).
disabledbooleanfalseTurns the long press off.
hapticsbooleantrueMedium impact on open, a tick per emoji crossed, light impact on pick.
classNamestringWrapper: margins, alignment.
pillClassNamestringEmoji pill: background, border, shadow.
badgeClassNamestringBadge disc, also used by the emoji flying to the bubble.
backdropClassNamestringtransparentLayer over the screen while the picker is open, e.g. bg-black/20 to dim.

Source

Previous: NumberTicker · Next: VoiceNote · All components

dissolve is MIT licensed. Source on GitHub, package on npm. This page as markdown. For AI agents: llms.txt.