Command Palette

Search for a command to run...

Bubble

shadcn/ui

Styled chat message bubble with alignment variants and reaction badges.

Bubble
Hey! Did you get a chance to review the new layout specs?
Yes! Just finished looking through them. Everything looks super clean.
๐Ÿ‘2
Awesome, I pushed the updated spacing tokens to the branch.
Pulled and verified. Ready to ship whenever you are!
๐Ÿš€1

import { Bubble, BubbleContent, BubbleGroup, BubbleReactions } from "@/components/optics/bubble";<BubbleGroup className="w-full max-w-md gap-4">  <Bubble    align="start"    variant="muted"  >    <BubbleContent>      Hey! Did you get a chance to review the new layout specs?    </BubbleContent>  </Bubble>  <Bubble    align="end"    className="mb-3"    variant="default"  >    <BubbleContent>      Yes! Just finished looking through them. Everything looks super clean.    </BubbleContent>    <BubbleReactions align="end">      <span>        ๐Ÿ‘      </span>      <span className="text-xs text-muted-foreground">        2      </span>    </BubbleReactions>  </Bubble>  <Bubble    align="start"    variant="secondary"  >    <BubbleContent>      Awesome, I pushed the updated spacing tokens to the branch.    </BubbleContent>  </Bubble>  <Bubble    align="end"    className="mb-3"    variant="tinted"  >    <BubbleContent>      Pulled and verified. Ready to ship whenever you are!    </BubbleContent>    <BubbleReactions align="start">      <span>        ๐Ÿš€      </span>      <span className="text-xs text-muted-foreground">        1      </span>    </BubbleReactions>  </Bubble></BubbleGroup>

Installation

pnpm dlx shadcn@latest add @optics/bubble

Props

<Bubble />
Name
Type
variant
"outline" | "default" | "secondary"(default: default)
align
"end" | "start"(default: start)

<BubbleContent />
Name
Type
render
string(default: undefined)
<BubbleReactions />
Name
Type
side
"bottom" | "top"(default: bottom)
align
"end" | "start"(default: end)