Chat message bubbles with variants, grouped corners, reactions and room for interactive content.
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.
npm packages it adds
- cn
- @base-ui/react
- class-variance-authority
Code
import {
Bubble,
BubbleContent,
BubbleGroup,
BubbleReactions,
} from "@/components/ui/bubble"
export function BubbleDemo() {
return (
<div className="flex w-full max-w-md flex-col gap-3">
<Bubble variant="secondary">
<BubbleContent>
I checked the registry output and removed the stale route.
</BubbleContent>
<BubbleReactions role="img" aria-label="Reactions: thumbs up">
<span>👍</span>
</BubbleReactions>
</Bubble>
<BubbleGroup>
<Bubble align="end">
<BubbleContent>Nice, thanks!</BubbleContent>
</Bubble>
<Bubble align="end">
<BubbleContent>Did the preview deploy pick it up?</BubbleContent>
</Bubble>
</BubbleGroup>
<Bubble variant="ghost">
<BubbleContent>
Yes. The preview at build 1482 serves the new route, and the old one
now returns a 404 as expected.
</BubbleContent>
</Bubble>
</div>
)
}
































