Reaction bar preview

Reaction bar

Like, comment, repost and share in one pill – icons pop and fill, counts roll in digit by digit

  • Group
    Buttons
  • Origin
    Copied · affectUI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/reaction-bar

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { ReactionBar } from "@/registry/components/reaction-bar/reaction-bar";

<ReactionBar>Label</ReactionBar>

Props

NameTypeDefaultDescription
reactionsPartial<Record<ReactionKey, { count; active? }>>Starting count and pressed state per action
onReact(key, state) => voidCalled after a toggle with the new count and state
actionsReactionKey[]["like", "comment", "repost", "share"]Which actions to show, in order
classNamestringExtra class on the pill

When to use

- Reactions under posts, comments or updates in a feed - Any toggle with a public count, like saves or upvotes

When not to use

A single primary action (button) or AI-message actions (message-actions).

Related

Message actions · Number ticker · Comment thread