AI / Agent components
Ten purpose-built components for the agent era — chat threads, reasoning traces, tool calls, source citations, and agent cards. Designed to slot into the Vercel AI SDK, the AI Elements library, and any custom agent runtime.
Live chat demo
A full chat mockup combining Message, Reasoning, Tool, Sources, and PromptInput in a single conversation.
Message
User vs assistant messages
<Message role="user">
<MessageAvatar role="user">
<Avatar><AvatarFallback>You</AvatarFallback></Avatar>
</MessageAvatar>
<MessageContent>Hello, JSN.</MessageContent>
</Message>Reasoning
Collapsible reasoning trace
Reasoning
Step 1: parse the user's question. Step 2: look up the relevant docs. Step 3: synthesize a final answer.
<Reasoning durationMs={800}>
<ReasoningTrigger />
<ReasoningContent>...</ReasoningContent>
</Reasoning>Tool
Collapsible tool call with output
3 results in 0.42s<Tool>
<ToolHeader>
<ToolName name="search_docs" />
</ToolHeader>
<ToolOutput output="3 results in 0.42s" />
</Tool>Sources
Citation list
<Sources items={[
{ title: "React docs", url: "https://react.dev" },
{ title: "Next.js docs", url: "https://nextjs.org/docs" },
]} />Agent Card
Status-coded agent tiles
Research Agent
RunningLooks up sources and synthesizes answers.
Code Agent
DoneEdits files and runs tests.
Vision Agent
ErrorReads images and answers questions.
Browse Agent
IdleNavigates the open web.
<AgentCard
name="Research Agent"
description="..."
status="running"
/>Code Block
TypeScript with syntax highlighting
TypeScript
import { Button } from "@/components/ui/button";
export function Hello() {
return <Button>Click me</Button>;
}<CodeBlock language="ts" code={...} />Artifact
Preview panel with close button
Generated landing copy
Headline: Ship AI-powered products in days, not months.
<Artifact>
<ArtifactHeader title="Generated copy" />
<ArtifactContent>...</ArtifactContent>
</Artifact>Loaders
Three built-in loader styles
<Loader><LoaderDots /></Loader>
<Loader><LoaderSpinner /></Loader>
<Loader><LoaderBars /></Loader>Prompt Input
Full input with tools and submit
<PromptInput>
<PromptInputTools>
<PromptInputActionMenu />
</PromptInputTools>
<PromptInputTextarea placeholder="..." />
<PromptInputSubmit />
</PromptInput>