Bubble
Bubble shows one message in a conversation. Use it as the body of a chat or assistant turn. For the avatar, header and footer around it, use Message.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Composition
Examples
With reactions
Pin a reaction pill to the corner of each bubble.
All variants
Compare every variant aligned to the start and the end.
muted
primary
outline
ghost
destructive
Props
Bubble
| Prop | Type | Default | Description |
|---|---|---|---|
align | "end" | "start" | null | No default documented | No description |
variant | "destructive" | "outline" | "ghost" | "muted" | "primary" | null | "muted" | No description |
BubbleContent
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Renders the child element instead, such as |
BubbleGroup
BubbleGroup adds no props of its own; it accepts the props of the element or primitive it wraps.
BubbleReactions
| Prop | Type | Default | Description |
|---|---|---|---|
align | "end" | "start" | null | "end" | No description |
side | "bottom" | "top" | null | "bottom" | No description |
Bubble shows one message in a conversation. Use it as the body of a chat or assistant turn. For the avatar, header and footer around it, use Message.
Installation
Install the following dependencies:
Copy and paste the following code into your project.
components/bubble/Bubble.vue components/bubble/BubbleContent.vue components/bubble/BubbleGroup.vue components/bubble/BubbleReactions.vue components/bubble/index.ts Keep each file at the path shown above it.
Paths are relative to
packages/vue/src/. Keep the same folders under your@/root, and the imports between files work without edits.
Usage
Examples
With reactions
Pin a reaction pill to the corner of each bubble.
All variants
Compare every variant aligned to the start and the end.
Props
Bubble
| Prop | Type | Default | Description |
|---|---|---|---|
align | "start" | "end" | null | No default documented | No description |
variant | "destructive" | "outline" | "ghost" | "muted" | "primary" | null | "muted" | No description |
BubbleContent
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Renders the child element instead, such as |
BubbleGroup
BubbleGroup adds no props of its own; it accepts the props of the element or primitive it wraps.
BubbleReactions
| Prop | Type | Default | Description |
|---|---|---|---|
align | "start" | "end" | null | "end" | No description |
side | "bottom" | "top" | null | "bottom" | No description |