# Chat Thread

Message thread that shows three bouncing typing dots before a "them" reply, pops bubbles in, and scrolls up as it fills.

```bash
npx shadcn add https://www.reelcn.dev/r/chat-thread.json
```

Usage:

```tsx
<PhoneFrame>
  <ChatThread
    messages={[
      { from: "me", text: "Can it render 9:16?", at: 0 },
      { from: "them", text: "Yes. Same component, three formats.", at: 30 },
    ]}
  />
</PhoneFrame>
```

Use for:

- A DM, support chat or group thread inside a `phone-frame` or app mockup
- Showing a bot or assistant "typing" before it answers

Avoid:

- A single command-and-output log. Use `terminal`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| messages | `ChatMessage[]` | — |  |
| typingDuration? | `number` | — | Frames the typing dots show before a "them" message lands. Defaults to 0.6s. 0 skips the dots. |
| width? | `number` | `460` | Visible thread width in design units. |
| height? | `number` | `480` | Visible thread height in design units. Older bubbles scroll out the top once it's full. |
| fontSize? | `number` | `24` | Largest font size in design units. |
| background? | `string` | — |  |
| meColor? | `string` | — | "me" bubble fill. Defaults to the theme accent. |
| meTextColor? | `string` | — |  |
| themColor? | `string` | — | "them" bubble fill. Defaults to the theme surface. |
| themTextColor? | `string` | — |  |
| radius? | `number` | — |  |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |