v0.1 public beta early access on GitHub
Home / Components / message-bubble

Message BubbleAndroid

Chat message surface with variants (solid, soft, tint, outline, ghost, danger), alignment, entrance animation, and optional timestamp. Sent bubbles pop in with a restrained overshoot.

$ npx lumioui add message-bubble
import { MessageBubble, MessageBubbleGroup } from "@/components/ui/message-bubble/message-bubble";
Parts: MessageBubbleGroup
Message Bubblemessage-bubble.tsx
message-bubble/message-bubble.tsx open

Live preview — the real component, driven by the props below.

Props17
MessageBubble
variant? MessageBubbleVariant Bubble style. Default "soft".
align? MessageBubbleAlign Which side. Default "start".
animateIn? boolean Play an entrance animation when mounted. Default false.
timestamp? string Optional timestamp shown below the bubble (exposed to screen readers).
sender? string Optional sender name — exposed to screen readers, not rendered.
onPress? () => void Press handler — bubbles can be tappable (e.g. to open actions).
onReply? () => void Swipe-right callback — shows a reply icon during the gesture.
onLongPress? () => void Long-press callback — for context menus / action sheets.
sameAsPrev? boolean Previous bubble in the group shares this align (same sender run) — tightens the corner on the grouped side. Auto-inferred inside MessageBubbleGroup; set explicitly to override.
sameAsNext? boolean Next bubble in the group shares this align — keeps the grouped corner tight through the whole run.
enableSwipeReply? boolean Enable swipe-to-reply gesture. Default true when onReply is set.
className? string
textClassName? string
children? React.ReactNode
MessageBubbleGroup
spacing? "compact" | "default" Spacing between bubbles. Default "compact".
className? string
children? React.ReactNode
Message Bubble — Chatchat.tsx
message-bubble/variants/chat.tsx open

Chat message surface with variants (solid, soft, tint, outline, ghost, danger), alignment, entrance animation, and optional timestamp. Sent bubbles pop in with a restrained overshoot.

Message Bubble — Variantsvariants.tsx
message-bubble/variants/variants.tsx open

Chat message surface with variants (solid, soft, tint, outline, ghost, danger), alignment, entrance animation, and optional timestamp. Sent bubbles pop in with a restrained overshoot.