ValyroUI Русская версия

Reaction Bar

Likes and reactions. Pro · Content and social › Social

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add reaction-bar
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ReactionBar } from 'valyro-ui-pro';

Props

PropTypeDefault
valueReaction[]Controlled value; use with onValueChange.
defaultValueReaction[][]Initial value when uncontrolled.
onValueChange(reactions: Reaction[]) => voidCalled with the new value when it changes.
onReact(emoji: string, reacted: boolean) => voidFired for every toggle, with the viewer's new state for that emoji.
optionsReactionOption[]A fixed set of reactions offered in a compact grid. Without it the full EmojiPicker opens (search, categories, skin tones, recently used).
pickerOpenbooleanWhether the reaction picker is open.
defaultPickerOpenbooleanfalsePicker open on first render (uncontrolled); it does not take focus then, only when opened later.
onPickerOpenChange(open: boolean) => voidCalled when the picker opens or closes.
size'sm' | 'md''md'Chip height: md 32px (default, under posts and messages), sm 28px (dense rows such as comments).
localestringLocale for counts (default: the ThemeProvider's, then the browser's).
labelsPartial<ReactionBarLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Profile Card · Next: Media Gallery · All Content and social