Variants
Marker, highlighter, paper shade, a marker wash, paper and a line, red pencil hatching, and nothing at all. The tail sits on the sender's side.
A chat bubble drawn like a person draws one: a single felt-tip stroke round a pillowy box, a solid fill (blue for what you send, gray or highlighter for the rest) and a tail on the sender's side. Also a folded note or a sticky note.
npx shadcn@latest add @wobko/bubbleFirst time here? Add the registry to components.json first. How to install
Marker, highlighter, paper shade, a marker wash, paper and a line, red pencil hatching, and nothing at all. The tail sits on the sender's side.
Bubbles inside Messages: the tail follows the sender, the earlier bubbles of a run lose theirs, a reaction chip sits on the edge, and the header and footer are hand notes.
A bubble does not have to be a cloud. A note is a slip of paper folded twice, a sticky is a sticky note, and `pen="you"` writes in blue felt and the script font.
asChild turns a bubble into a real button: it wobbles on hover (drop-lines), draws a blue ring on keyboard focus, and can be pressed. Good for suggested replies.
The row of one message body: aligns itself, carries the variant and the shape, and shares them with its content.
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive" | "default" | The ink: marker, highlighter, paper shade, a marker wash, paper and a line, nothing at all (prose), or red pencil hatching. |
| align | "start" | "end" | "start" (or the enclosing Message) | Which end of the row it sits on; the tail follows, and flips in right-to-left. |
| shape | "cloud" | "note" | "sticky" | "cloud" | A hand-drawn speech bubble, a folded slip of paper, or a sticky note (note and sticky are a Paper). |
| pen | "ink" | "you" | "ink" | `you` writes the outline in blue felt and the words in the script font: the person typing. |
| tail | boolean | true | Draw the tail flick. Inside a BubbleGroup the earlier bubbles hide it by themselves. |
The body, and the element that is drawn. Text is real DOM text; the outline and fill are an aria-hidden svg behind it. `asChild` turns a bubble into a button or link (hover drop-lines, a drawn focus ring).
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean | false | Render the child element (a button or an anchor) as the bubble. |
| paper | Partial<PaperProps> | - | For `note` and `sticky`: tape, fastener, curl, tilt or edge of the sheet. |
| seed | string | number | - | Pins the hand: the same seed always draws the same bubble. |
A sticker chip that sits on the edge of a bubble: white vinyl, a cut line, a warm shadow. Put emoji, counts or small buttons inside.
| Prop | Type | Default | Description |
|---|---|---|---|
| side | "top" | "bottom" | "bottom" | Which edge of the bubble it overlaps. |
| align | "start" | "end" | "end" | Which corner. |
The files the CLI copies into your project.
Loading the source