# ThreadPrimitive URL: /docs/api-reference/primitives/Thread Primitives for the message list, viewport, and welcome screen. *** title: ThreadPrimitive description: Primitives for the message list, viewport, and welcome screen. --------------------------------------------------------------------------- A conversation between a user and an assistant. import { ParametersTable } from "@/components/docs/tables/ParametersTable"; ## Anatomy ```tsx import { ThreadPrimitive } from "@assistant-ui/react"; const Thread = () => ( ... ); ``` ## API Reference ### Root Containts all parts of the thread. This primitive renders a `
` element unless `asChild` is set. ### Viewport The scrollable area containing all messages. Anchors scroll to the bottom as new messages are added. This primitive renders a `
` element unless `asChild` is set. ### Messages Renders all messages. This primitive renders a separate component for each message. ### MessageByIndex Renders a single message at the specified index in the current thread. ```tsx ``` ### Empty Renders children only when there are no messages. ### ScrollToBottom A button to scroll the viewport to the bottom. Disabled when the viewport is already at bottom. This primitive renders a `