Bubble

Message bubbles as in Messages: blue for what you send, grey for what you receive.

@cupertinoui/bubbleRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/bubble

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Bubble, BubbleContent } from "@/components/ui/bubble"

<Bubble align="end">
  <BubbleContent>On my way!</BubbleContent>
</Bubble>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Bubble

PropTypeDescription
variant"default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive"
Default: "default"
Sent (blue), received (grey) and other styles.
align"start" | "end"
Default: "start"
Which side it sits on.
classNamestringExtra classes, merged with the component's own.

BubbleReactions

PropTypeDescription
side / alignWhere the reaction sits on the bubble.
classNamestringExtra classes, merged with the component's own.