AI interface components that people and agents can both use, for React, Vue, Svelte, Solid and Web Components, built on UI SDK.
Docs · Components · Showcases · Changelog
- 58 components for AI chat and agent interfaces: conversations and streaming markdown, the steps an agent takes, the places a person answers it, the output it hands back, and the shell around a chat: its list of past chats, a sidebar and search.
- Five frameworks. Every component ships for React, Web Components, Vue, Svelte and Solid, rendering the same parts, options, states and styles from one behavior.
- Built on UI SDK. Focus, keyboard navigation, popups, dismissal and screen reader announcements come from UI SDK, not hand-written code.
- Agent-operable. An agent connected with UI SDK's
createAgentreads the same components a person sees and runs their actions, with a person confirming the ones that matter. - Built for streaming. Markdown parses only the blocks that changed, logs follow the newest content until the reader scrolls away, and rows animate in once, when they mount.
- Yours to edit. The shadcn CLI copies the styled components into your project. They are Tailwind CSS v4 utilities over
--kind-*theme tokens, with light and dark fromcolor-scheme. - AI SDK adapter. Map AI SDK
UIMessages to the components' data with@kind-ui/agent-ui/adapters/ai-sdk.
Agent UI needs Tailwind CSS v4. Pick the layer your app uses:
| Layer | Needs | Registry item |
|---|---|---|
| React | React 19 | <name> |
| Web Components | any page | <name>-web |
| Vue | Vue 3.5 or later | <name>-vue |
| Svelte | Svelte 5.33 or later, with runes | <name>-svelte |
| Solid | Solid 2 (solid-js and @solidjs/web) |
<name>-solid |
Add the @kind-ui registry to your components.json. In a React app, run npx shadcn@latest init first if you have none; a Vue, Svelte or Solid app writes the file by hand, as Get Started shows:
{
"registries": {
"@kind-ui": "https://kindui.dev/r/{name}.json"
}
}Then add components by name, with your layer's suffix:
npx shadcn@latest add @kind-ui/composer # React
npx shadcn@latest add @kind-ui/composer-web # Web Components
npx shadcn@latest add @kind-ui/composer-vue # Vue
npx shadcn@latest add @kind-ui/composer-svelte # Svelte
npx shadcn@latest add @kind-ui/composer-solid # SolidThe first add also installs @kind-ui/agent-ui, @ui-sdk/core and your layer's UI SDK package at their pinned versions, imports @kind-ui/agent-ui/styles.css into your stylesheet, and writes an AGENTS.md beside the components for coding agents. The React components build in a default Next.js 16 app, Turbopack included, with no extra config.
To set it up with a coding agent instead, copy the prompt from Get Started.
Give your coding agent the Agent UI skill, so it knows which component fits a job and how to compose them, connect the AI SDK, expose actions to agents and ask the person first:
npx skills add kind-ui/agent-ui --skill agent-uiIt also ships in the npm package, at node_modules/@kind-ui/agent-ui/skills/agent-ui/SKILL.md.
import { Composer, ComposerInput, ComposerSubmit } from "@/components/ui/composer";
export function Prompt() {
return (
<Composer aria-label="Message" onSubmit={(draft) => chat.send(draft.text, draft.attachments)}>
<ComposerInput aria-label="Prompt" placeholder="Ask anything" />
<ComposerSubmit />
</Composer>
);
}Return a promise from onSubmit to keep the composer pending until the message is sent.
Each -web item exports a define… function that registers its kind-* elements. They render into light DOM, so the same stylesheet styles them:
import { defineStep } from "@/components/ui/web/step";
defineStep();<kind-step status="complete">
<kind-step-trigger>
<button><kind-step-icon></kind-step-icon><kind-step-title>Read the logs</kind-step-title></button>
</kind-step-trigger>
<kind-step-content><p>Three timeouts.</p></kind-step-content>
</kind-step>Props are kebab-case attributes or properties, and callbacks are lowercase DOM events. Each component page lists both.
<script setup>
import { Composer, ComposerInput, ComposerSubmit } from "@/components/ui/vue/composer";
const send = (draft) => chat.send(draft.text, draft.attachments);
</script>
<template>
<Composer aria-label="Message" :on-submit="send">
<ComposerInput aria-label="Prompt" placeholder="Ask anything" />
<ComposerSubmit />
</Composer>
</template><script lang="ts">
import { Composer, ComposerInput, ComposerSubmit } from "@/components/ui/svelte/composer/index.js";
</script>
<Composer aria-label="Message" onSubmit={(draft) => chat.send(draft.text, draft.attachments)}>
<ComposerInput aria-label="Prompt" placeholder="Ask anything" />
<ComposerSubmit />
</Composer>import { Composer, ComposerInput, ComposerSubmit } from "@/components/ui/solid/composer";
export function Prompt() {
return (
<Composer aria-label="Message" onSubmit={(draft) => chat.send(draft.text, draft.attachments)}>
<ComposerInput aria-label="Prompt" placeholder="Ask anything" />
<ComposerSubmit />
</Composer>
);
}Part and option names match React's in every layer. Controlled props and callbacks follow each framework (v-model:open in Vue, bind:open in Svelte, open and onOpenChange in Solid), and each component page's API reference lists them.
Create one UI SDK agent bridge, and every Agent UI component on the page joins it:
import { createAgent } from "@ui-sdk/react/agent"; // or @ui-sdk/web/agent, @ui-sdk/vue/agent, …
const agent = createAgent();
agent.snapshot(); // [{ ref: "c1", component: "kind-model-selector", label: "Model", value: "gpt-6.1-sol", actions: ["setValue"] }, …]
await agent.act({ steps: [{ ref: "Model", action: "setValue", args: ["claude-sonnet-5.5"] }] });An agent sends a whole task in one act call. Give a model the snapshot, act and query tools from agentTools, or a browser's agent through WebMCP with registerTools(agent, { allow }), and pass act a signal that the chat's Stop aborts. Each action reaches your callbacks with details.source set to "agent". Actions that decide something, like approving a tool call or accepting a plan, wait for a person to confirm unless your allow lets them through. Each component page's Agent section lists its actions, and the Agents page wires it all up.
import { fromUIMessages, toApprovalResponse } from "@kind-ui/agent-ui/adapters/ai-sdk";
const rendered = fromUIMessages(messages, { status, error });ai is an optional peer dependency, imported for types only. See the AI SDK adapter page.
58 components in six groups. Each name links to its docs page, with a live example and every layer's code.
| Component | Description |
|---|---|
| Conversation | A message log that follows new content and offers a jump to the latest, with loading, error and empty states. |
| Message | A chat message with copy, regenerate, edit and branch controls, a menu of ways to regenerate, its author and time, and Retry or Continue when it failed or stopped. |
| Markdown | Streaming markdown that parses only the blocks that changed. |
| Code Block | A code block with its language, a wrap toggle and a copy button. |
| Markdown Table | A table that scrolls sideways instead of squeezing its columns, with a copy button. |
| Composer | A prompt input with mentions, commands, attachments, submit and stop, steering a running turn, saved drafts, and a layout for narrow screens. |
| Attachments | A removable list of attached files. |
| Uploader | File uploads with progress, cancel and retry. |
| Loader | A labeled loading indicator. |
| Thinking Indicator | Shows that the agent is thinking. |
| Typing Indicator | Shows that the agent is typing. |
| Streaming Text | Appended text chunks fading in, with an optional caret. |
| Component | Description |
|---|---|
| Step | One step of an agent's work, with its status and details. Includes Step List. |
| Status | Whether an agent is running, waiting, complete or has failed. |
| Reasoning | The model's reasoning as a step, with its thoughts streamed as markdown. |
| Tool | A tool call as a step, from its input to its output or error. |
| Chain of Thought | A summary of the steps an agent took, with each step's details. |
| Step Group | A turn's tool calls, commands or agents folded under one line that names the work and its status. |
| Task | The steps an agent takes for one task, as it takes them. |
| Plan | The steps an agent plans to take, with a progress bar and an Accept button. |
| Subagent | A subagent's run: its own steps, a Stop button and its result. |
| Queue | The agent's to-do list, queued and completed, that people can reorder and clear. |
| Component | Description |
|---|---|
| Confirmation | Approve or deny what the agent wants to do, and keep the decision in view. |
| Question | Single choice, multiple choice and free text questions in one form. |
| Checkpoint | A point in the conversation a person can go back to, after a dialog asks first. |
| Model Selector | Pick the model that answers, from a button that opens a searchable list grouped by provider. |
| Reasoning Effort | Choose how hard the model thinks, from a row of levels. |
| Suggestion | Prompts a person can send in one press. |
| Context Meter | How full the context window is, what fills it, and how much of the plan's usage limits is left. |
| Feedback | Rate a response and optionally leave a comment. |
| Notice | A calm callout for info, success, a warning or an error. |
| Guardrail Notice | Shows that a guardrail blocked or filtered content, with the policy reason. |
| Component | Description |
|---|---|
| Sources | The sources a response used, behind a compact count that opens into links. |
| Inline Citation | A marker in running text whose card shows the sources it points to. |
| Document | A document card with its title, kind and size, and an expandable preview. |
| Generated Image | An image the agent is making, from progress to preview to the full image. |
| Diff | The files an agent changed, with Keep and Undo by file, by change or all at once. |
| File Tree | Changed files as a folder tree, with each change and its added and removed lines. |
| Terminal | A command and its output in ANSI colors, following the end as it streams. |
| Stack Trace | An error the agent hit, with its frames and the library frames folded away. |
| Test Results | A test run's results over a filterable tree of suites. |
| Transcript | Speaker-labelled, timed segments with search and playback seeking. |
| Selection | A small toolbar of actions above text a person selects in a reply. |
| Action | An action run on selected text, shown as a step. |
| Component | Description |
|---|---|
| Picker | A button that opens a searchable list of choices, with groups, two-line rows, pages and footer actions. |
| Add Menu | A plus button that opens a menu of what can be added, with icons, descriptions, groups and submenus. |
| Settings Menu | A menu of settings: toggles drawn as switches, and choices in submenus showing their value. |
| Approval Mode | How much the agent may do without asking, chosen from a menu with the risky mode marked. |
| Model Control | The model and its effort in one button, with Model and Effort submenus. |
| Context Bar | Removable context chips, the ones that don't fit behind a +N button that lists them. |
| Dictation | A mic button that turns speech into text through a source the host chooses, with a live waveform. |
| Component | Description |
|---|---|
| Thread List | Past chats grouped by date, to open, rename, pin, share or delete. |
| Thread Search | A search dialog over past chats, grouped like the list, with New chat. |
| Sidebar | A panel beside the page that people resize and collapse, and a drawer on narrow screens. |
| Day Separator | A heading where a new day starts in a conversation, reading Today or Yesterday. |
| Connection Status | A pill over the conversation while the connection drops, comes back or resumes a stream. |
| Share Dialog | Choose who can open a chat, then create, copy or stop sharing its link. |
| Conversation Search | Find text in a conversation's messages, with marks beside the scrollbar. |
Each showcase plays one scripted agent run with several components working together:
- Agent Activity: reasoning, parallel tool calls with an approval, a plan, a subagent and a queue.
- Human Input: a question, an approval inside a tool call, a checkpoint, notices, feedback and suggestions, with a model selector, reasoning effort and context meter in the composer.
- Developer Output: a transcript, terminal output, test results and a stack trace, a file tree, a document, a generated image, cited sources and an action on selected text.
The npm package holds the behavior, types and styles the copied components import:
npm install @kind-ui/agent-ui @ui-sdk/core| Entry | Contents |
|---|---|
@kind-ui/agent-ui |
Neutral types for messages, parts, steps, tool calls and approvals |
@kind-ui/agent-ui/core |
The primitives, the markdown engine and the motion helper |
@kind-ui/agent-ui/adapters/ai-sdk |
AI SDK message mapping |
@kind-ui/agent-ui/styles.css |
Component styles and theme tokens |
Releases are published from CI with npm provenance. The package README covers the theme tokens and the adapter in detail.
Set any --kind-* token in your own @theme or :root. Colors are light-dark() pairs, so dark mode follows color-scheme:
@import "tailwindcss";
@import "@kind-ui/agent-ui/styles.css";
:root {
color-scheme: light dark;
--kind-color-accent: var(--color-violet-600);
--kind-radius: 0.5rem;
}| Path | Contents |
|---|---|
packages/agent-ui |
The @kind-ui/agent-ui package, its render files and the published agent-ui skill |
registry |
The shadcn registry catalog served at kindui.dev/r |
apps/docs |
The docs site, with every component's page and live example |
tests |
Browser specs for every layer, fixtures and consumer type tests |
scripts |
Checks: UI SDK usage guard, packed package, bundle size, registry consumers |
Requires Node 22.22 (or 24.11) or newer and npm 11.9.
npm ci
npm run check:fast # lint, typecheck, script and unit tests
npm run dev:docs # docs site with every exampleRead CONTRIBUTING.md and AGENTS.md before you open a pull request. Report vulnerabilities privately as described in SECURITY.md.
MIT. Third-party notices are in THIRD_PARTY_NOTICES.md.