---
id: thread
title: Thread
---

import Client from '../common-content/core-components/chat/props/client.mdx'

import Thread from '../common-content/core-components/channel/props/thread.mdx'

import CloseThread from '../common-content/contexts/thread-context/close_thread.mdx'
import LoadMoreThread from '../common-content/contexts/thread-context/load_more_thread.mdx'
import ReloadThread from '../common-content/contexts/thread-context/reload_thread.mdx'

Component to render thread replies for a message, along with and input box for adding new thread replies. This component internally uses `MessageList` and `MessageInput` components.

## Basic Usage

```tsx
<OverlayProvider>
  <Chat client={client}>
    <Channel channel={channel} thread={messageId}>
      <Thread />
    </Channel>
  </Chat>
</OverlayProvider>
```

## Props

### additionalMessageInputProps

Additional [props](./message_input.mdx#props) for underlying `MessageInput` component.

| Type |
| - |
| object |

### additionalMessageListProps

Additional [props](./message_list.mdx#props) for underlying `MessageList` component.

| Type |
| - |
| object |

### autoFocus

When true, input box will be auto focused upon mounting.

| Type | Default |
| - | - |
| boolean | true |

<!-- ### closeThreadOnDismount -->

### <div class="description">overrides the value from [ChatContext](../contexts/chat_context.mdx#client)</div> client {#client}

<Client />

### <div class="description">overrides the value from [ThreadContext](../contexts/thread_context.mdx#closeThread)</div> closeThread {#closeThread}

<CloseThread />

### disabled

When true, the underlying input box will be disabled.

| Type | Default |
| - | - |
| boolean | false |

### <div class="description">overrides the value from [ThreadContext](../contexts/thread_context.mdx#loadMoreThread)</div> loadMoreThread {#loadMoreThread}

<LoadMoreThread />

### onThreadDismount

Function which gets called when Thread component unmounts.

| Type |
| - |
| function |

### <div class="description">overrides the value from [ThreadContext](../contexts/thread_context.mdx#reloadThread)</div> reloadThread {#reloadThread}

<ReloadThread />

### <div class="description">overrides the value from [ThreadContext](../contexts/thread_context.mdx#thread)</div> thread {#thread}

<Thread />

