# Bubble

> The speech bubble used inside a message.

- Category: [App & chat](https://tarve.dev/docs.md#chat)
- Import: `import { Bubble } from "@tarve/core";`
- Props type: `BubbleProps`
- Source: [packages/core/src/chat-controls.ts:67](https://github.com/omarcosr/tarve/blob/main/packages/core/src/chat-controls.ts#L67)

## Usage

```tsx title="Bubble.tsx"
import { Bubble, Column, Row, Text } from "@tarve/core";

<Column gap={8} style={{ width: 320 }}>
  <Row>
    <Bubble side="incoming">
      <Text>Is the release ready?</Text>
    </Bubble>
  </Row>
  <Row justify="end">
    <Bubble side="outgoing">
      <Text>Shipping it now.</Text>
    </Bubble>
  </Row>
</Column>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `maxWidth` | ``number \| `${number}%``` | `"80%"` |  |
| `side` | `BubbleSide` | `"incoming"` |  |
| `variant` | `BubbleVariant` | `"default"` |  |

## Common props

Shared by every component (descriptions: https://tarve.dev/docs.md#common-props): `children`, `class`, `className`, `highlight`, `id`, `key`, `motionFrom`, `onHighlight`, `onPaste`, `onPointerLeave`, `onPointerMove`, `onSize`, `onTransitionEnd`, `rovingGroup`, `style`.

## Types

```ts title="BubbleSide"
type BubbleSide = "incoming" | "outgoing";
```

```ts title="BubbleVariant"
type BubbleVariant = "default" | "secondary" | "destructive";
```

Previous: [Message](https://tarve.dev/docs/components/Message.md) · Next: [MessageScroller](https://tarve.dev/docs/components/MessageScroller.md)

---

Tarve v0.13.8 · HTML version: https://tarve.dev/docs/components/Bubble · Index for agents: https://tarve.dev/llms.txt
