Components / Chat / Chat Container
Chat Container
Auto-scrolling chat viewport that sticks to the bottom as messages stream in.
Installation
Install the Chat Container React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):
npx shadcn@latest add @ai-primitive/chat-container
Usage
import { ChatContainerRoot, ChatContainerContent, ChatContainerScrollAnchor } from "@/components/ui/chat-container"
Related components
- Chat Bubble - Message bubble primitives - avatars, filled/no-background appearances, timestamps, and actions.
- Prompt Input - Auto-resizing chat input with attachments, an action menu, and a compact pill mode.
- Chat Demo - A full conversation - chat bubbles, prompt input, and a dummy AI reply wired together.
Previous: Prompt Suggestion · Next: Reasoning