Skip to content

Bubble ​

Message bubble

One message in a conversation — chat, comments, an assistant's reply. Put bubbles in a Message for the avatar, name and time around them.

Basic
surface (default)
outline
plain — no box
accent, end, reactions
Long text clamped to two lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.
  • align="end" for the viewer's own messages — variant="outline" sets them apart without colour; accent is for a message that is chosen (a pinned or selected one). collapsible clamps a long message to lines with a Show more toggle that says whether it's open.
  • reactions are pressed-state buttons (@react).

Usage ​

ts
import { BlessBubble } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
variant"accent" | "surface" | "outline" | "plain""surface"
align"start" | "end""start"
collapsibleboolean—clamp to n lines with a show-more toggle
linesnumber4
reactionsBlessReaction[]—
moreLabelstring"Show more"
lessLabelstring"Show less"

Events

NamePayloadDescription
react[reaction: BlessReaction]

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.