Skip to content

AI chat UI components for React

Free AI chat UI components for React: message threads, streaming text, prompt input with attachments, tool calls, reasoning blocks, citations and model picker.

37 itemsFree, MITshadcn CLI compatibleTailwind CSS v4Light and dark

This category has the parts of an AI chat screen: the transcript (ChatThread, MessageBubble, StreamingMessage), the composer (PromptInput, AiComposer, SuggestionChips, attachment and context chips), the agent at work (ToolCallCard, AgentTrace, ReasoningBlock) and the sources behind an answer (CitationChip, SourceCard). ChatPage puts the core pieces together as a full-height screen.

They render state you pass in and call your handlers, so they work with any model API, the Vercel AI SDK or a plain fetch stream. ChatThread is a role="log" region that sticks to the newest message unless the reader has scrolled up, and StreamingMessage is aria-busy while tokens arrive, so screen readers wait for the finished text.

Which one should I use?

You needUseWhy
A whole chat screenChat PageHeader, transcript, composer
A scrolling transcriptChat ThreadSticks to the newest message
A simple composerPrompt InputEnter sends, Shift+Enter adds a line
A composer with model picker and attachAi ComposerSend turns into stop while streaming
Text arriving token by tokenStreaming MessageBlinking caret, aria-busy
Cancel a running responseStop GeneratingWire it to an AbortController
One tool call with its statusTool Call CardArguments, duration, output
A whole agent runAgent TraceTimeline of steps
The model's thinking, foldedReasoning BlockShows how long it took
Cite a source inlineCitation ChipNumbered, button or link
A retrieved source with a snippetSource CardFor RAG answers
Choose a modelModel PickerBuilt on Select
A token budgetToken Usage MeterUsed against a limit
Copy, retry and rate a replyMessage ActionsUnder assistant turns
Follow-up promptsSuggestion ChipsClick sends or fills the composer

37 items

npx shadcn@latest add @minidev/agent-trace @minidev/ai-composer @minidev/artifact-preview @minidev/attachment-chip @minidev/chat-thread @minidev/citation-chip @minidev/context-chip @minidev/context-pill @minidev/conversation-sidebar @minidev/feedback-thumbs @minidev/markdown-renderer @minidev/message-actions @minidev/message-bubble @minidev/model-compare @minidev/model-picker @minidev/pinned-message @minidev/prompt-input-attachments @minidev/prompt-input @minidev/prompt-library @minidev/read-receipt @minidev/reasoning-block @minidev/regenerate-bar @minidev/source-card @minidev/stop-generating @minidev/streaming-cursor @minidev/streaming-message @minidev/suggestion-chips @minidev/thinking-block @minidev/token-usage-meter @minidev/tool-call-card @minidev/tool-call-collapsed @minidev/tool-result-panel @minidev/typing-indicator @minidev/chat-page @minidev/agent-plan @minidev/speech-input @minidev/message-branch

Components 36

  • React timeline of an AI agent run: each tool step shows pending, running, done or error, reports its duration and folds out details. The header sums up the run.

    npx shadcn@latest add @minidev/agent-trace
  • Chat input for AI apps with a multiline textarea, Enter to send, suggestion chips, attach button, model picker and a stop button while a response streams.

    npx shadcn@latest add @minidev/ai-composer
  • Framed preview for AI generated artifacts such as code, documents or UI, with a title bar, copy button and optional expand action for a full view.

    npx shadcn@latest add @minidev/artifact-preview
  • Compact Tailwind file chip with a paperclip icon, truncated filename and an optional remove button, for attachments in chat composers, emails and forms.

    npx shadcn@latest add @minidev/attachment-chip
  • Scrolling chat thread for React that renders user, assistant and system messages as bubbles, auto scrolls to the newest one and uses a live log role.

    npx shadcn@latest add @minidev/chat-thread
  • Inline citation button for AI answers, with an accent source number and label. Link it to a source panel or popover so users can check references.

    npx shadcn@latest add @minidev/citation-chip
  • Small toggle chip for picking context in AI prompts or filters, with an active accent state and hover styling. Passes through all native button props.

    npx shadcn@latest add @minidev/context-chip
  • Rounded pill for showing attached context, such as files or pages in an AI prompt, with a truncated label and an optional remove button.

    npx shadcn@latest add @minidev/context-pill
  • React chat history sidebar with a New chat button and a scrolling list of conversations showing title and relative time. Highlights the active chat.

    npx shadcn@latest add @minidev/conversation-sidebar
  • Thumbs up and thumbs down buttons for rating an answer or article. Uses aria-pressed, toggles off on a second click, and works controlled or uncontrolled.

    npx shadcn@latest add @minidev/feedback-thumbs
  • A small React renderer for AI output that splits text into paragraphs on blank lines and turns fenced code blocks into scrollable monospace panels.

    npx shadcn@latest add @minidev/markdown-renderer
  • A row of ghost icon buttons for chat replies: copy, retry, good response and bad response, each with an aria label and callback. Place it under AI messages.

    npx shadcn@latest add @minidev/message-actions
  • A React chat message for user, assistant and system roles: user turns sit in a right aligned capsule, assistant replies read as prose, with a streaming cursor.

    npx shadcn@latest add @minidev/message-bubble
  • A comparison table for AI models listing name, latency with a color coded badge, cost and a quality note per row. Helps users pick between LLM providers.

    npx shadcn@latest add @minidev/model-compare
  • A dropdown for choosing an AI model, built on the Select component with an accessible trigger and a placeholder. Pass an array of models and read the chosen id.

    npx shadcn@latest add @minidev/model-picker
  • A highlighted pinned note for chat channels and threads with a pin icon, a Pinned by author line and the message body on an accent tinted Tailwind background.

    npx shadcn@latest add @minidev/pinned-message
  • The AI prompt composer with an Attach file button and helper text above it, forwarding every PromptInput prop. For chat apps that accept documents or images.

    npx shadcn@latest add @minidev/prompt-input-attachments
  • An AI chat composer that grows with its content, sends on Enter, adds a newline on Shift Enter and has attach, toolbar and send controls. Built for React.

    npx shadcn@latest add @minidev/prompt-input
  • A searchable list of saved prompts that filters by title, body and tag as you type and returns the chosen prompt through onSelect. Useful in React AI apps.

    npx shadcn@latest add @minidev/prompt-library
  • Message read receipt icon that shows a single check for sent, a double check for delivered, and an accent double check once read. Labelled for screen readers.

    npx shadcn@latest add @minidev/read-receipt
  • Collapsible AI reasoning block, folded by default. The title shimmers while the model is thinking, then reads Thought for Ns, with an animated height reveal.

    npx shadcn@latest add @minidev/reasoning-block
  • Footer bar for AI answers with a Not quite right prompt, a Regenerate button with a refresh icon, and an optional Edit prompt action when onEdit is set.

    npx shadcn@latest add @minidev/regenerate-bar
  • Citation source card for AI answers showing a title, a source badge, the truncated URL and a short snippet. List references under a generated response.

    npx shadcn@latest add @minidev/source-card
  • Stop generating button with a filled square icon and an onClick handler, for cancelling a streaming AI response mid-answer in chat interfaces built with React.

    npx shadcn@latest add @minidev/stop-generating
  • Blinking caret that sits inline at the end of streaming text, sized to the line and hidden from screen readers. Signals an AI response is still arriving.

    npx shadcn@latest add @minidev/streaming-cursor
  • Chat message bubble that renders partial AI output with a blinking caret at the end, for showing token-by-token streaming responses in a Tailwind chat UI.

    npx shadcn@latest add @minidev/streaming-message
  • Row of rounded suggestion chips such as Summarize or Find bugs that call onSelect when clicked. Use them as prompt starters under a React AI chat input.

    npx shadcn@latest add @minidev/suggestion-chips
  • React Thinking panel with a chevron header and aria-expanded that reveals the model's intermediate reasoning in muted text. Collapsed by default in chat.

    npx shadcn@latest add @minidev/thinking-block
  • LLM token usage meter showing tokens used against a monthly limit, a labelled progress bar and a percent of budget note with the reset date. Useful in AI apps.

    npx shadcn@latest add @minidev/token-usage-meter
  • Agent tool call card showing the tool name, argument preview, duration and a running, done or failed status chip, with collapsible monospace output below.

    npx shadcn@latest add @minidev/tool-call-card
  • Compact collapsed tool call row with a rotating chevron and monospace tool name that expands to show its details. Keeps agent traces tidy inside chat threads.

    npx shadcn@latest add @minidev/tool-call-collapsed
  • Tool result panel with the tool name, a success, error or running status badge and the output shown in a JSON code block. Built in React for AI agent UIs.

    npx shadcn@latest add @minidev/tool-result-panel
  • Tailwind typing indicator with three pulsing dots in a rounded pill, staggered by 120ms, with role status and a Typing label. Shows someone is replying in chat.

    npx shadcn@latest add @minidev/typing-indicator
  • React AI agent plan and to-do list: pending, in progress, completed, failed and skipped tasks with subtasks, tool chips and a progress bar that fills.

    npx shadcn@latest add @minidev/agent-plan
  • React speech to text button on the Web Speech API: live interim text, a mic ring that follows your voice, Escape to stop, no API key and no dependencies.

    npx shadcn@latest add @minidev/speech-input
  • React version switcher for AI chat replies: step through regenerated answers with ‹ 2 / 3 › buttons or Alt+Arrow keys, with a cross-fade and live count.

    npx shadcn@latest add @minidev/message-branch

Blocks and full pages 1

  • A fixed height AI chat page in React with a header, a scrollable thread of user and assistant messages, and a prompt input pinned to the bottom.

    npx shadcn@latest add @minidev/chat-page

Using an AI coding agent? Read the agent guide, point it at /llms.txt for the full index, or paste /AGENTS.md into your project. Every component has plain Markdown docs at /docs/<name>.md.

See them live

Galleries render these components with sample data in every state.

GuideAI chat UI in React: streaming messages, tool calls and reasoningBuild an AI chat UI in React: stream tokens with a ReadableStream reader, render reasoning and tool calls, auto scroll, stop and retry. Works with any provider.

Frequently asked questions

Do these work with the Vercel AI SDK or OpenAI?

Yes. They are presentational components: you pass messages and streaming state from whichever SDK or fetch call you use, and they call your handlers when people send, stop or retry.

How do I stream a response into the UI?

Append each chunk to the last message in your state and render it with StreamingMessage while streaming is true; it shows a blinking caret. Wire StopGenerating to your AbortController so people can cancel. The AI chat guide walks through a full build.

How do I show tool calls and agent steps?

ToolCallCard shows one call with its arguments, status, duration and collapsible output. AgentTrace shows a whole run as a timeline where the running step spins and finished steps report their time. ToolCallCollapsed is a quiet one-line version.

Should I use PromptInput or AiComposer?

PromptInput is the plain composer: it grows with its content, Enter sends and Shift+Enter adds a line. AiComposer adds suggestion chips, a model picker, an attach button and a send button that becomes stop while a response streams.