# ThreadList
URL: /docs/ui/thread-list
Switch between conversations. Supports sidebar or dropdown layouts.
***
title: ThreadList
description: Switch between conversations. Supports sidebar or dropdown layouts.
--------------------------------------------------------------------------------
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
import { ThreadListSample } from "@/components/docs/samples/threadlist-sample";
This demo uses **ThreadListSidebar**, which includes `thread-list` as a dependency and provides a complete sidebar layout. For custom implementations, you can use `thread-list` directly.
## Getting Started
### Add the component
Use `threadlist-sidebar` for a complete sidebar layout or `thread-list` for custom layouts.
#### ThreadListSidebar
#### ThreadList
### Use in your application
```tsx title="/app/assistant.tsx"
import { Thread } from "@/components/assistant-ui/thread";
import { ThreadListSidebar } from "@/components/assistant-ui/threadlist-sidebar";
import {
SidebarProvider,
SidebarInset,
SidebarTrigger
} from "@/components/ui/sidebar";
export default function Assistant() {
return (
{/* Add sidebar trigger, location can be customized */}
);
}
```
```tsx title="/app/assistant.tsx"
import { Thread } from "@/components/assistant-ui/thread";
import { ThreadList } from "@/components/assistant-ui/thread-list";
export default function Assistant() {
return (
);
}
```
## Anatomy
The ThreadList component is built with the following primitives:
```tsx
import { ThreadListPrimitive, ThreadListItemPrimitive } from "@assistant-ui/react";
(
),
}}
/>
```
## API Reference
### ThreadListPrimitive.Root
Container for the thread list.
### ThreadListPrimitive.Items
Renders all threads in the list.
### ThreadListPrimitive.New
A button to create a new thread.
### ThreadListItemPrimitive.Root
Container for a single thread item. Automatically sets `data-active` and `aria-current` when this is the current thread.
### ThreadListItemPrimitive.Trigger
A button that switches to this thread when clicked.
### ThreadListItemPrimitive.Title
Renders the thread's title.
### ThreadListItemPrimitive.Archive
A button to archive the thread.
### ThreadListItemPrimitive.Unarchive
A button to restore an archived thread.
### ThreadListItemPrimitive.Delete
A button to permanently delete the thread.
### ThreadListItemMore
A dropdown menu for additional thread actions, built on Radix UI DropdownMenu:
* `ThreadListItemMorePrimitive.Root` - Menu container
* `ThreadListItemMorePrimitive.Trigger` - Button to open the menu
* `ThreadListItemMorePrimitive.Content` - Menu content container
* `ThreadListItemMorePrimitive.Item` - Individual menu item
* `ThreadListItemMorePrimitive.Separator` - Visual separator between items
## Related Components
* [Thread](/docs/ui/thread) - The main chat interface displayed alongside the list