AI Primitives

Components / Chat / Prompt Input

Prompt Input

Auto-resizing chat input with attachments, an action menu, and a compact pill mode.

Installation

Install the Prompt Input React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):

npx shadcn@latest add @ai-primitive/prompt-input

Usage

import { PromptInput, PromptInputTextarea, PromptInputToolbar, PromptInputTools, PromptInputModelSelect, PromptInputSubmit } from "@/components/ui/prompt-input"

Related components

  • Chat Bubble - Message bubble primitives - avatars, filled/no-background appearances, timestamps, and actions.
  • Chat Demo - A full conversation - chat bubbles, prompt input, and a dummy AI reply wired together.
  • Chat Container - Auto-scrolling chat viewport that sticks to the bottom as messages stream in.

Previous: Chat Bubble · Next: Chat Demo