smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Chat

MessageBubble

A single chat message, tokenised and a11y-clean.

Public export

typescript
import { MessageBubble } from '@happyvertical/smrt-ui/chat';
Import path
@happyvertical/smrt-ui/chat
Props
10
Props described
10 of 10
Bindable state
0
Callback events
0
Verified release
0.62.10

Props

NameTypeRequiredDescription
variantMessageBubbleVariantNoVisual tone. Canonical styling axis.
ownbooleanNoWhether the current viewer authored this message — drives alignment + own-color.
roleChatMessageRoleNoLegacy role. Prefer `variant` + `own`. Sets the header's role label and, when `variant`/`own` are unset, derives them (user → own default, agent → agent, system → system).
contentstringNoPlain-text body. Ignored when a `children` snippet is provided.
childrenSnippetNoBody snippet (takes precedence over `content`).
authorstringNoDisplay name of the sender. When set, a header + labelled group render.
timestampDateNoMessage time; rendered in a `<time datetime>` element in the header.
timestampLabelstringNoOverride the visible timestamp text (defaults to a locale time).
reactionsSnippetNoOptional reactions row (e.g. a `ReactionPicker` or reaction chips).
actionsSnippetNoOptional per-message actions (reply, copy, …).

Bindable state

This component has no bindable public state.

Callback events

This component declares no callback event props.

Examples and explanation