Message bubble

One message in a conversation: an SMS/MMS bubble aligned by direction, with media previews, an optimistic dimmed pending state, and a timestamp plus delivery indicator on outbound messages. This is the atomic unit the thread is built from.

Hey — are we still on for 2pm?

Mar 4

Yes! Marcus is 15 minutes out.

Mar 4

Sending now…

Mar 4

Installation

npx shadcn@latest add @handset/message-bubble

Installs delivery-status as a dependency.

Usage

import { MessageBubble } from "@/components/handset/message-bubble";

{messages.map((m) => (
  <MessageBubble key={m.id} message={m} />
))}

Pass hideMeta to drop the timestamp/delivery row when you stack several bubbles into a single group (see message-group).

Props

Props
PropTypeDefaultDescription
messageOutgoingMessage—The message to render (the shape returned by useThread).
hideMetabooleanfalseHide the timestamp + delivery row, for grouping.
classNamestring—Merged onto the row wrapper.