Components / Bubble
Bubble
The message surface. Sizes to content up to 80% of the row; seven variants cover the primary, neutral, tinted, and error treatments. Composes inside ZitsMessageContent, or stands alone.
Examples
Set Variant to change the visual style. ghost drops the frame and the max-width cap, useful for assistant markdown that should span the row. Reactions overlap the bottom edge of a bubble, so leave room below.
razor
<ZitsBubble Variant="secondary">
<ZitsBubbleContent>Nice work on the release.</ZitsBubbleContent>
<ZitsBubbleReactions>
<span role="img" aria-label="Reactions: thumbs up, heart">👍 ❤️</span>
</ZitsBubbleReactions>
</ZitsBubble>Installation
Terminal
bash
navius add chatAPI reference
ZitsBubble (root; in chat UIs prefer setting alignment on ZitsMessage instead):
| Prop | Type | Default |
|---|---|---|
| Variant | string | "default" |
| Align | string | "start" |
ZitsBubbleReactions:
| Prop | Type | Default |
|---|---|---|
| Side | string | "bottom" |
| Align | string | "end" |
Parts
| Prop | Type | Default |
|---|---|---|
| ZitsBubbleGroup | container | stacks consecutive bubbles from the same sender |
| ZitsBubble | root | variant + align (default | secondary | muted | tinted | outline | ghost | destructive) |
| ZitsBubbleContent | slot | the framed surface; render your own button/a inside for an interactive bubble |
| ZitsBubbleReactions | slot | overlapping reaction row, side/align anchor the edge |