# Bubble

> Conversational surface with variants, grouping, and reactions.

Registry name: `bubble`. HTML docs: https://ui.anuragroy.dev/component/bubble.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/bubble.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/bubble.json`.

Registry JSON: https://ui.anuragroy.dev/r/bubble.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/bubble.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import {
  Bubble,
  BubbleContent,
  BubbleGroup,
  BubbleReactions
} from "@/components/ui/bubble"
```

## Usage

```tsx
import {
  Bubble,
  BubbleContent,
  BubbleGroup,
  BubbleReactions,
} from "@/components/ui/bubble"

export function Example() {
  return (
    <BubbleGroup>
      <Bubble variant="secondary">
        <BubbleContent>Neutral assistant bubble.</BubbleContent>
      </Bubble>
      <Bubble variant="default" align="end">
        <BubbleContent>Primary user bubble.</BubbleContent>
        <BubbleReactions>👍</BubbleReactions>
      </Bubble>
    </BubbleGroup>
  )
}
```

## API

### Bubble

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | "default" \| "secondary" \| "muted" \| "tinted" \| "outline" \| "ghost" \| "destructive" | "default" |  |
| `align` | "start" \| "end" | — |  |

### BubbleReactions

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `side` | "top" \| "bottom" | "bottom" |  |
| `align` | "start" \| "end" | "end" |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/bubble): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/bubble.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
