Quickstart
Configure the @composerkit shadcn registry and render your first component in a Next.js app.
ComposerKit distributes React components for chat interfaces and data-dense workspaces through the shadcn registry at https://composerkit.dynd.ai/r/{name}.json. Installing an item copies its TypeScript source, internal dependencies, and CSS tokens directly into your src/ folder.
| Area | Highlights | Where to go next |
|---|---|---|
| Chat and AI | composer, conversation-view, tool-call, reasoning, diff, markdown | Composer reference |
| Data workspace | data-grid, charts, scheduler, tree-view, date-time-picker | Data grid guide |
| Design system | Single DESIGN.md token pipeline, nested .light and .dark scopes | Theming guide |
| Shared primitives | button, checkbox, text-field, select, date-picker, dialog, tabs | Gallery |
This tutorial sets up the @composerkit registry and renders a working InlineComposer in a fresh Next.js app. No AI service or API key is needed. Use Node.js 26 and npm in an empty folder named composerkit-demo.
1. Create the app
npx --yes create-next-app@latest . --yes --use-npm --disable-git --src-dir2. Add the ComposerKit registry
The first command initializes shadcn in the app. The second command maps the @composerkit namespace to the public ComposerKit registry.
npx shadcn@latest init --defaults --yes
npx shadcn registry add '@composerkit=https://composerkit.dynd.ai/r/{name}.json'3. Add the Composer
This command copies the Composer, its internal dependencies, and the ComposerKit stylesheet into src/. It replaces the starter src/lib/utils.ts with the ComposerKit helper.
npx shadcn add @composerkit/composer --overwrite --yesReplace the starter global stylesheet so Tailwind CSS v4 loads the ComposerKit tokens and theme scopes.
@import "../styles/globals.css";4. Render the Composer
Replace src/app/page.tsx with the file below. Keep "use client" at the top because the page holds the draft text in React state.
"use client";
import { InlineComposer } from "@/components/ui/composer";
import { TooltipProvider } from "@/components/ui/tooltip";
import { useState } from "react";
export default function Home() {
const [draft, setDraft] = useState("");
const [sentText, setSentText] = useState("");
return (
<main className="bg-background text-foreground min-h-dvh p-8">
<div className="mx-auto max-w-2xl">
<TooltipProvider>
<InlineComposer
canCancel={false}
canSubmit={draft.trim() !== ""}
label="Write a message"
multiline
onCancel={() => {}}
onSubmit={() => {
setSentText(draft);
setDraft("");
}}
submitLabel="Send"
>
<textarea
aria-label="Write a message"
className="w-full resize-none bg-transparent outline-none"
onChange={(event) => setDraft(event.target.value)}
placeholder="Write a message"
rows={1}
value={draft}
/>
</InlineComposer>
</TooltipProvider>
<p aria-live="polite" className="mt-4">
{sentText}
</p>
</div>
</main>
);
}5. Run the development server
npm run dev -- --port 3060Open http://localhost:3060. Type a message and press Enter to see the submitted text rendered below the composer.
6. Verify the production build
Stop the development server with Ctrl+C, then run the production build.
npx next buildNext.js prints / as a static route and exits without errors.
Next steps
- Install workspace components with the same registry:
@composerkit/data-grid,@composerkit/charts,@composerkit/scheduler,@composerkit/tree-view, or@composerkit/date-time-picker. - Read the Data grid guide, Charts guide, Scheduler guide, Date pickers guide, and Theming guide.
- For coding agents, fetch
/llms.txtfor the index or/llms-full.txtfor the full documentation bundle.