Skip to content
Agent UI
Provider composesCopy-paste blockanthropic-composeLive stage

Claude Compose

A copy-paste block that recreates the Claude prompt stage with Anthropic's rail, brand mark, prompt surface, model menu, and tool toggles. The block is not a package component: copy the file, or install it with the shadcn CLI, then edit the layout like any other file in your project. It is assembled entirely from Agent UI compose primitives, and every control is keyboard accessible.

Source you own: install the block with the shadcn CLI or copy components/blocks/composes/anthropic-compose.tsx. The preview below is the real file, and the code tab is the exact source.

components/blocks/composes/anthropic-compose.tsx
ClaudeTry Claude free

What can I help with?

Your thinking partner for big ambitions

Claude can make mistakes. Check important info.

By chatting, you agree to Anthropic's Terms and Privacy Policy.

The code tab contains the full block, ready to copy.

Installation

Add the block with the shadcn CLI. It writes components/blocks/composes/anthropic-compose.tsx and installs its dependencies.

bash
npx shadcn@latest add https://agent-ui-27t.pages.dev/r/anthropic-compose.json

Prefer to own the file manually? Install the dependencies, then copy the source from the Files section.

bash
pnpm add @agent-ui/react lucide-react

Tailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.

Usage

Import the copied file and render it anywhere. The block accepts onSend, disabled, and className; wire onSend to any backend.

tsx
import { AnthropicCompose } from "@/components/blocks/composes/anthropic-compose";
 
<AnthropicCompose onSend={(text) => console.log(text)} />

Files

One file. The same source is served by the shadcn registry endpoint, so the CLI and the docs can never drift.

components/blocks/composes/anthropic-compose.tsxtsx
tsx
"use client";
 
import * as React from "react";
import { ArrowUp, Globe, Plus, Sparkles } from "lucide-react";
import {
ComposeSendButton,
ComposeTextarea,
ModelChip,
createCompose,
useCompose,
type ComposeProps,
} from "@agent-ui/react";
 
const Root = createCompose({
id: "anthropic",
maxWidth: "max-w-none",
placeholder: "How can I help you today?",
models: [
{ id: "claude-sonnet-4-5", name: "Claude Sonnet 4.5", hint: "Best for most tasks" },
{ id: "claude-opus-4-1", name: "Claude Opus 4.1", hint: "Most capable" },
{ id: "claude-haiku-4-5", name: "Claude Haiku 4.5", hint: "Fastest" },
],
initialToggles: { search: false, thinking: false },
});
 
function ClaudeStar({ className }: { className?: string }) {
return (
<svg viewBox="0 0 24 24" className={className} aria-hidden="true" fill="none">
<g stroke="currentColor" strokeWidth="2.1" strokeLinecap="round">
<path d="M12 2.5v19M2.5 12h19M5.3 5.3l13.4 13.4M18.7 5.3 5.3 18.7" />
</g>
</svg>
);
}
 
/** Claude: parchment canvas, Copernicus-style serif, terracotta accents. */
function AnthropicComposeLayout() {
const { toggles, toggle } = useCompose();
return (
<div className="relative flex min-h-[400px] w-full flex-col overflow-hidden bg-[#f7f4ed] px-6 pb-6 pt-4 text-[13px] text-[#3d3929]">
<div className="flex items-center gap-2">
<ClaudeStar className="h-5 w-5 text-[#c96442]" />
<span className="font-serif text-[19px] leading-none tracking-[-0.01em]">Claude</span>
<span className="ml-auto rounded-full border border-[#d9d3c7] px-3 py-1 text-[10.5px] text-[#6b6455]">
Try Claude free
</span>
</div>
 
<div className="my-auto flex w-full flex-col items-center">
<h1 className="text-center font-serif text-[32px] leading-[1.1] tracking-[-0.02em] text-[#3d3929]">
What can I help with?
</h1>
<p className="mt-2 font-serif text-[12.5px] italic text-[#6b6455]">
Your thinking partner for big ambitions
</p>
 
<div
data-agent-id="compose-card"
className="mt-5 flex w-full max-w-[468px] flex-col rounded-2xl border border-[#d9d3c7] bg-[#fbfaf7] p-3 shadow-[0_1px_3px_rgba(61,57,41,0.05)] transition-[border-color,box-shadow] duration-200 focus-within:border-[#c96442]/50 focus-within:shadow-[0_2px_16px_rgba(201,100,66,0.12)]"
>
<ComposeTextarea
aria-label="Reply to Claude"
placeholder="How can I help you today?"
rows={2}
className="min-h-[48px] px-1 py-1 text-[14px] leading-6 text-[#3d3929] placeholder:text-[#9a9384]"
/>
<div className="mt-2 flex items-center justify-between gap-2">
<div className="flex min-w-0 items-center gap-1.5">
<button
type="button"
aria-label="Attach"
className="grid h-7 w-7 place-items-center rounded-lg border border-[#d9d3c7] bg-white/60 text-[#6b6455] transition-colors hover:bg-white"
>
<Plus className="h-3.5 w-3.5" aria-hidden="true" />
</button>
<button
type="button"
aria-label="Toggle web search"
aria-pressed={toggles.search}
onClick={() => toggle("search")}
className="flex items-center gap-1 rounded-full border border-transparent px-2 py-1 text-[11px] text-[#6b6455] transition-colors hover:bg-[#efeae0] aria-pressed:border-[#d9d3c7] aria-pressed:bg-white aria-pressed:text-[#3d3929]"
>
<Globe className="h-3 w-3" aria-hidden="true" /> Research
</button>
<button
type="button"
aria-label="Toggle extended thinking"
aria-pressed={toggles.thinking}
onClick={() => toggle("thinking")}
className="flex items-center gap-1 rounded-full border border-transparent px-2 py-1 text-[11px] text-[#6b6455] transition-colors hover:bg-[#efeae0] aria-pressed:border-[#d9d3c7] aria-pressed:bg-white aria-pressed:text-[#3d3929]"
>
<Sparkles className="h-3 w-3" aria-hidden="true" /> Think
</button>
</div>
<div className="flex shrink-0 items-center gap-1.5">
<ModelChip
tone="light"
className="[&>button]:h-7 [&>button]:px-1.5 [&>button]:text-[11px] [&>button]:text-[#6b6455] [&>button]:hover:bg-[#efeae0]"
/>
<ComposeSendButton
aria-label="Send message"
className="h-7 w-7 bg-[#c96442] text-white hover:bg-[#b5593a] disabled:bg-[#d9c3b8] disabled:text-white disabled:opacity-100"
icon={<ArrowUp className="h-3.5 w-3.5" strokeWidth={2.4} />}
/>
</div>
</div>
</div>
 
<p className="mt-3 text-[10px] text-[#8a8375]">
Claude can make mistakes. Check important info.
</p>
</div>
 
<p className="text-center text-[9px] text-[#a39c8d]">
By chatting, you agree to Anthropic&apos;s{" "}
<a href="#" className="underline">
Terms
</a>{" "}
and{" "}
<a href="#" className="underline">
Privacy Policy
</a>
.
</p>
</div>
);
}
 
export function AnthropicCompose(props: ComposeProps) {
return (
<Root {...props}>
<AnthropicComposeLayout />
</Root>
);
}
 

Built with

The block imports these Agent UI primitives. Each one is a package export with its own docs page, so you can change the layout without giving up the behaviour.

Accessibility

All controls expose accessible names; the textarea supports Enter to send and Shift+Enter for a new line.

Claude also has a full product page.

Metadata, model list, and the same block in a dedicated route.

Open Claude
Use it with the rest of the library

AnthropicCompose composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.

136 lines · copy-ready