The Future of Web Dev
The Future of Web Dev
React UI Component Library for AI Coding Agents – Brainless
Add editable Claude Code, Codex, and Grok terminal UIs to your website with a React UI component library installed through the shadcn CLI.

brainless is an open-source React UI component library that recreates the terminal UIs of Claude Code, OpenAI Codex, and Grok Build in the browser.
It includes 30+ components and ready-made session blocks for displaying agent conversations, command output, code changes, approval requests, and interactive prompt inputs.
Features
- Terminal styling based on actual CLI captures from all three coding agents.
- Animated thinking indicators and task progress displays.
- Expandable tool output and keyboard-operable permission controls.
- Filterable slash-command menus.
- Model, working directory, token usage, and execution mode displays.
- Editable TypeScript components with Tailwind CSS styling.
Use Cases
- Demonstrate a coding agent’s workflow on a product landing page.
- Illustrate tool calls and file modifications in developer documentation.
- Build a web dashboard for reviewing agent activity and approving proposed commands.
- Prototype a terminal-style onboarding flow with interactive prompts.
Available UI Components
Claude Code
Claude Header, Claude Message, Claude Thinking, Claude Tool Call, Claude Todo List, Claude Diff, Claude Permission, Claude Slash Menu, Claude Prompt.

Codex
Codex Header, Codex Message, Codex Exec, Codex Working, Codex Diff, Codex Permissions, Codex Slash Menu, Codex Prompt.

Grok
Grok Header, Grok Status, Grok Message, Grok Event, Grok Thought, Grok Thinking, Grok Working, Grok Tool, Grok Write, Grok Permission, Grok Plan, Grok Project Picker, Grok Shortcuts, Grok Settings, Grok Turn End, Grok Slash Menu, Grok Prompt.

Available Blocks
| Block | Description |
|---|---|
| Claude Session | Claude Code session with task progress, tool calls, a file diff, an approval request, and a prompt input. |
| Codex Session | Codex session with a model header, conversation, command output, working indicator, and prompt input. |
| Grok Session | Grok Build session with status information, tool activity, file changes, permission controls, and a completion message. |
| Grok Session Active | In-progress Grok session with streaming thought text, token usage, a file write preview, and a busy-state prompt. |
| Pied Piper Onboarding | Terminal-style signup demo with typed assistant messages and interactive questions. |
How To Use It
1. Install a session block
Use a React project with Tailwind CSS and shadcn/ui configured.
If you have not initialized shadcn/ui, run:
npx shadcn@latest initInstall the Claude Code session block and its component dependencies:
npx shadcn@latest add https://brainless.swerdlow.dev/r/claude-session.jsonTo install the Claude, Codex, and Grok session blocks together, use:
npx shadcn@latest add https://brainless.swerdlow.dev2. Basic Usage
Create app/agent-demo/page.tsx in a Next.js App Router project with the standard @/components alias:
import { ClaudeSession } from "@/components/brainless/blocks/claude-session";
export default function AgentDemoPage() {
return (
<main className="mx-auto max-w-4xl px-6 py-12">
<section className="rounded-lg bg-[#1a1a1a] p-6">
<ClaudeSession />
</section>
</main>
);
}3. Register the brainless namespace (Optional)
For repeated component installations, add the registry to your existing components.json. Preserve any other entries under registries.
{
"registries": {
"@brainless": "https://brainless.swerdlow.dev/r/{name}.json"
}
}Or register the namespace with the Bun command:
bunx shadcn@latest registry add '@brainless=https://brainless.swerdlow.dev/r/{name}.json'Install additional blocks or individual components by name:
npx shadcn@latest add @brainless/grok-session-active
npx shadcn@latest add @brainless/pied-piper-onboarding
npx shadcn@latest add @brainless/codex-diff4. Build a custom agent transcript
With the namespace registered, install these components if you skipped the Claude Session installation:
npx shadcn@latest add @brainless/claude-message @brainless/claude-tool-call @brainless/claude-promptCreate components/release-assistant.tsx and render ReleaseAssistant in place of ClaudeSession on your page. The example starts with sample build output. Press Enter to append a new user message to the local transcript.
"use client";
import { useState } from "react";
import { ClaudeMessage } from "@/components/brainless/claude/claude-message";
import { ClaudeToolCall } from "@/components/brainless/claude/claude-tool-call";
import { ClaudePrompt } from "@/components/brainless/claude/claude-prompt";
export function ReleaseAssistant() {
const [prompt, setPrompt] = useState("");
const [messages, setMessages] = useState<string[]>([]);
return (
<section className="space-y-4 rounded-lg bg-[#1a1a1a] p-6">
<ClaudeMessage role="user">
Check the release build before deployment.
</ClaudeMessage>
<ClaudeMessage>
The production build completed successfully.
</ClaudeMessage>
<ClaudeToolCall tool="Bash" arg="npm run build" result="Build passed">
{"Compiled successfully\nStatic pages generated: 24"}
</ClaudeToolCall>
{messages.map((message, index) => (
<ClaudeMessage key={index} role="user">
{message}
</ClaudeMessage>
))}
<ClaudePrompt
value={prompt}
mode="plan"
effort="high"
placeholder="Enter your next task"
onChange={(event) => setPrompt(event.target.value)}
onKeyDown={(event) => {
if (event.key === "Enter" && !event.nativeEvent.isComposing && prompt.trim()) {
event.preventDefault();
// Append the prompt to the transcript.
setMessages((previous) => [...previous, prompt.trim()]);
setPrompt("");
}
}}
/>
</section>
);
}Alternatives and Related Resources
- Copy-Paste Terminal UI Components for React – termcn
- Halaska UI: React & shadcn UI Kit for AI Products
- Copy-paste React Components for AI Chat UI – Nexus UI
- JSON-Native UI Components for AI Conversations – Tool UI
FAQs
Q: Do the components require an AI API key?
A: No. The session blocks render sample data locally. For a working coding assistant, connect the UI to your agent backend and pass its responses, tool results, and approval state to the components.
Q: Does ClaudePrompt handle Shift+Tab mode switching automatically?
A: No. Manage the selected mode in your application state and update the mode prop through the onKeyDown callback.
Q: How do I update a component after customizing it?
A: Commit your local changes, run the corresponding shadcn add command again, and review the source diff before accepting an overwrite.





