Browse components

component

Reactions

The emoji pill that overhangs the bottom edge of a bubble.

Install

npx shadcn@latest add https://whatsapp-components.crafter.run/r/reactions.json

Writes 5 files into your project, and installs clsx and tailwind-merge.

Preview

ยกEse mismo! Te mando la ficha ๐Ÿ‘‡3
Una sola reacciรณn, sin contador.
demos/reactions.tsx
import { MessageBubble } from "@/registry/whatsapp/message-bubble";
import { MessageMeta } from "@/registry/whatsapp/message-meta";
import { Reactions } from "@/registry/whatsapp/reactions";

export default function Demo() {
  return (
    <div className="flex flex-col gap-5">
      <MessageBubble
        direction="out"
        className="mb-3.5"
        meta={
          <MessageMeta timestamp={new Date(2025, 0, 6, 18, 14)} status="read" />
        }
      >
        ยกEse mismo! Te mando la ficha ๐Ÿ‘‡
        <Reactions
          direction="out"
          reactions={[{ emoji: "๐Ÿ˜", count: 2 }, { emoji: "๐Ÿ”ฅ" }]}
        />
      </MessageBubble>

      <MessageBubble direction="in" className="mb-3.5">
        Una sola reacciรณn, sin contador.
        <Reactions reactions={[{ emoji: "๐Ÿ‘", reactedByMe: true }]} />
      </MessageBubble>
    </div>
  );
}

Props

Read from ReactionsProps in the component source at build time.

ReactionsProps
PropTypeDefault
reactionsrequiredReaction[]โ€”
classNamestringโ€”
direction

Direction of the message being reacted to. Picks the side.

MessageDirection"in"
onToggle(emoji: string) => voidโ€”

Files

  • registry/whatsapp/reactions.tsx
  • registry/whatsapp/types.ts
  • registry/whatsapp/cn.ts
  • registry/whatsapp/whatsapp.css
  • LICENSE