4.2.0
Core

Bubble

The surface half of a chat message — the fill, the corner and the reaction pill a single line of conversation gets.

Bubble

The surface half of the chat family — the fill, the corner and the reaction pill. `Message` owns the layout around it, and the two are coupled: a bubble emits `data-variant`, which the message's header and footer read to drop their padding for a ghost.

The import finished, but 34 rows were skipped. Can you tell me why?
All 34 were missing a work email, which is the dedupe key on this list. They are held in the import's review queue rather than dropped.
Can you re-key them on company domain instead?
2 notes
Queued a second pass on domain. Estimated 40 seconds.
The second pass stopped at row 812 — the source file closed mid-read.

Usage

import {
  Bubble,
  BubbleContent,
  BubbleGroup,
  BubbleReactions,
} from '@oceanic-hub/brand-system'
<BubbleGroup>
  <Bubble>
    <BubbleContent>…</BubbleContent>
    <BubbleReactions>…</BubbleReactions>
  </Bubble>
</BubbleGroup>

Composition

Use the following composition to build a Bubble:

BubbleGroup
└── Bubble ×5
    ├── BubbleContent
    └── BubbleReactions

Bubble is SURFACE, Message is LAYOUT, and the split matters: this component owns what a line of conversation looks like, Message owns where it sits — the avatar column, the sender's name, the timestamp rail. Building a thread reaches for both; Bubble alone is what you use inside something that is already laying out the row. Neither this nor Message is the scroll container — a thread that grows while it is on screen lives inside a MessageScroller.

The two are mechanically coupled, not just conventionally paired: Bubble emits data-variant, which Message's header and footer read to drop their own padding for a ghost bubble; Message emits data-align on its group, which Bubble reads to hang itself off the correct edge. Deleting either attribute breaks the OTHER component's CSS, silently, on a green build — read message's own note alongside this one.

Every variant stays reachable, refused colours and all. Upstream's table is short and wrong in four separate ways once measured against this package's roles — relative-colour arithmetic where accent-tint / brand-soft already name the two steps it was computing, destructive written as coloured text at 1.7–1.9:1 contrast, secondary/muted on unaliased fills that would paint nothing, a translucent focus ring where a solid focus-visible:border-brand belongs. Put plainly: upstream computes tinted with oklch(from var(--primary) …) arithmetic and paints destructive as red text on a red tint, and both are refused — the tints are the accent-tint and brand-soft roles, and a status tone is a fill with the label in status-ink, never text. Each is a decision, not a silence — every line of core-layer.md that excludes one is cited in bubble.contract.test-d.ts. Dropping a variant because its upstream colours were wrong would have been the actual parity failure: the rule this package ports against is a floor, not a mould.

align is usually inherited from the enclosing Message; set it directly only for a bubble that stands outside one. There is no center — a bubble hangs off an edge by definition, and a centred row (a date divider, an unread rule) is a Marker, a different component with a different job.

Tooltip and Popover, upstream's last two examples, are not shipped here. Both are pure compositions of Tooltip and Popover wrapping arbitrary children — nothing about wrapping one in a Bubble is Bubble-specific, so a demo here would repeat those components' own pages rather than teach anything new.

Secondary

The other side of a two-party thread — a question back, not the surface that owns the row.

Which campaign did it belong to?

Muted

A step quieter than the surface it sits in — the assistant's own working note, not a reply that expects an answer.

Assistant is reading the run log.

Tinted

A step warmer than secondary — reach for it on a suggested next step, something the reader is invited to act on rather than merely told.

Suggested next step: retry the 34 held rows.

Outline

A hairline and no fill — a saved draft, present but not yet committed to the thread's history.

Draft saved to the contact record.

Ghost

No fill, no corner, no padding — a bubble that is only its words.

No fill, no corner, no padding — a bubble that is only its words.

Destructive

A delivery failure — the one tone with a genuine incident behind it, never a decoration.

Delivery failed: the mailbox rejected the message.

Alignment

align hangs a bubble off its own edge when it stands outside a Message — normally it is inherited from the enclosing message instead. start is incoming, end is the reader's own; there is no center, because a bubble hangs off an edge by definition.

This one stands alone, so align is set directly.
So is this one — the opposite edge.

asChild lives on BubbleContent, not on Bubble's root, so the hover and focus rules only light up when the content genuinely is a control — a retry tap target or a link preview, not a bubble of plain text.

Reactions

side picks which edge the pill straddles, align which end of that edge it sits at — bottom / end is the default, the corner a reply usually lands nearest. The pill is a hard, offsetless ring that punches its own cut-out in the bubble underneath, never a blurred one.

Top, start.
👍 3
Top, end.
👍 3
Bottom, start.
2 notes
Bottom, end — the default.
2 notes

Show more

Long content is a composition, not a Bubble prop: wrap the tail of a message in Collapsible and let its own trigger do the work. Bubble stays exactly what it always is — the fill and the corner — and does not grow a truncation feature of its own.

Full diagnostic: the source file listed 812 rows across three sheets. The first pass matched 778 on email, held 30 for missing an email address, and skipped 4 for a malformed date in the signup column.

API Reference

See the Bubble API page for every prop of every part, with types, defaults and the contract that pins them. It also documents bubbleVariants — exported alongside the parts, and signatures rather than props.

On this page