A chat bubble: a solid pane of text set in a dithered mat.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
Code
"use client";
import { Bubble, BubbleContent, BubbleGroup, BubbleReactions } from "@/registry/ui/bubble";
export default function BubbleDemo() {
return (
<BubbleGroup style={{ width: "min(440px, 100%)", gap: 14 }}>
<Bubble variant="muted">
<BubbleContent>Can the hero use the synthwave palette?</BubbleContent>
</Bubble>
<Bubble align="end">
<BubbleContent>Yes, and it recolours live.</BubbleContent>
<BubbleReactions aria-label="Reactions: fire">🔥</BubbleReactions>
</Bubble>
<Bubble variant="outline">
<BubbleContent>Outline for quoted text.</BubbleContent>
</Bubble>
<Bubble variant="secondary" align="end">
<BubbleContent>Secondary sits on a halftone mat.</BubbleContent>
</Bubble>
<Bubble variant="destructive">
<BubbleContent>Message failed to send.</BubbleContent>
</Bubble>
</BubbleGroup>
);
}
































