Kokonut UIPro
ComponentsTemplatesPricing
Sign inGet Pro
Kokonut UIPro
TemplatesPricingSign in
Get Kokonut UI Pro

01Get started

InstallationAgentsChangelog

02Templates

FleetNewMarlowNewAgentaNewLumeNewSonaeFutur

03Blocks & sections48

Login2 new4Features2 new9FAQs3 new5Footers1 new4HeroesNew9Pricings5 new8
Testimonials2 new3

04Components109

AINew19Cards11 new15Charts & DataNew6Headline3 new4Banners2 new5Buttons5 new12Forms2 new9Inputs12 new13Modals3 new8Toolbars2 new5Animated List3 new4Action Search Bar2 new3Action ToolbarUpdatedKanban BoardNewFile TreeNewReview PinsNewVersion HistoryNewTab StripNew

05More2

Team InvitationUpdatedCalendar Schedule
04Components109

19 components19 new, November 12, 2026

AI

Interfaces for AI products and agents: generation, streaming answers, reasoning, agent runs, plans and permissions, knowledge sources, evals, enrichment, cited replies and chat history.

01Image Generation CardNew, Oct 15

AI image panel: Generate resolves the image from coarse pixel blocks to sharp with a step counter, then four variations land. Pick one, or change the ratio.

Install with
no extra packages
Live sample
Preview width
Usage and propsReal data, 8 props, 3 dependencies

Usage

Pass generate to make real images. It gets the prompt, model and ratio with an AbortSignal and resolves to up to four image URLs; the first one resolves from blocks to sharp once it loads.

studio.tsx
"use client";

import ImageGenerationCard from "@/components/kokonutui-pro/image-generation-card";

export function Studio() {
  return (
    <ImageGenerationCard
      generate={async (request, signal) => {
        const res = await fetch("/api/images", {
          method: "POST",
          body: JSON.stringify(request),
          signal,
        });
        if (!res.ok) {
          throw new Error("The model is busy, try again in a minute");
        }
        const { urls } = await res.json();
        return urls;
      }}
      models={["gpt-image-1"]}
    />
  );
}
app/api/images/route.ts
import { openai } from "@ai-sdk/openai";
import { experimental_generateImage as generateImage } from "ai";

const SIZES = { "1:1": "1024x1024", "4:3": "1536x1024", "16:9": "1536x1024" } as const;

export async function POST(req: Request) {
  const { prompt, aspectRatio } = await req.json();
  const { images } = await generateImage({
    model: openai.image("gpt-image-1"),
    prompt,
    n: 4,
    size: SIZES[aspectRatio as keyof typeof SIZES],
    abortSignal: req.signal,
  });
  return Response.json({
    urls: images.map((image) => `data:${image.mediaType};base64,${image.base64}`),
  });
}

Props

prompt
stringDefault built-in

Initial prompt text

model
stringDefault DEFAULT_MODELS[0] ?? "Flux 1.1 Pro"

Initially selected model

models
string[]Default built-in

Models offered in the model menu

aspectRatio
AspectRatioDefault "4:3"

Initial aspect ratio

images
string[]

Image URLs to show instead of the procedural demo scenes. Variations rotate through the list on each generation.

onGenerate
(request: GenerateRequest) => void

Called when Generate is pressed

generate
(request: GenerateRequest, signal: AbortSignal) => Promise<string[]>

Makes the images. Resolve with up to four URLs (data URLs work too). Leave it out for the drawn demo scenes.

className
string

Extra classes for the root element.

AspectRatio

type AspectRatio = "1:1" | "4:3" | "16:9";

GenerateRequest

promptrequired
string
modelrequired
string
aspectRatiorequired
AspectRatio

Dependencies

cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


02Agent QuestionsNew, Oct 21

The questions an agent asks before it starts: pick with a click or a number key, and answers fold into a summary you can edit.

Install with
lucide-react, motion
Usage and propsReal data, 4 props, 5 dependencies

Usage

Render it for the agent's ask tool call and send the answers back as the tool's output. Return the Promise from onSubmit so Start waits for it.

ask-part.tsx
"use client";

import type { useChat } from "@ai-sdk/react";
import AgentQuestions, {
  type AgentQuestion,
} from "@/components/kokonutui-pro/agent-questions";

type Chat = ReturnType<typeof useChat>;

export function AskPart({
  part,
  addToolOutput,
}: {
  part: {
    toolCallId: string;
    state: string;
    input: { task: string; questions: AgentQuestion[] };
  };
  addToolOutput: Chat["addToolOutput"];
}) {
  if (part.state !== "input-available") {
    return null;
  }
  return (
    <AgentQuestions
      onSubmit={(answers) =>
        addToolOutput({
          tool: "ask",
          toolCallId: part.toolCallId,
          output: answers,
        })
      }
      questions={part.input.questions}
      task={part.input.task}
    />
  );
}

Props

questions
AgentQuestion[]Default built-in
task
stringDefault "Set up the marketing site"

What the agent is about to do, shown under the heading.

onSubmit
(answers: Record<string, QuestionAnswer>) => void | Promise<void>

Called with every answer when the user starts the run. Return a Promise to hold Start until it settles; a rejection shows its message.

className
string

Extra classes for the root element.

AgentQuestion

idrequired
string
titlerequired
string

Short name for the answer row, such as "Framework".

promptrequired
string
optionsrequired
QuestionOption[]
multiple
boolean

Pick any number instead of one.

allowOther
boolean

Offer a free-text "Other" row. Defaults to true.

QuestionAnswer

type QuestionAnswer =
  | { kind: "options"; ids: string[] }
  | { kind: "other"; text: string }
  | { kind: "agent" };

QuestionOption

idrequired
string
labelrequired
string
hint
string

One line on what picking it means.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


03Docs SearchNew, Oct 16

Search for a docs site that can also answer. Hits are grouped by page with the line that matched, and the first row asks instead: the answer is written from the matching sections, each sentence cites its source, and pointing at a citation lights up that source. With nothing to cite, it says so instead of guessing.

Install with
no extra packages
Usage and props5 props, 3 dependencies

Props

sections
DocSection[]Default built-in
defaultQuery
stringDefault ""
onNavigate
(section: DocSection) => void

Called when a result or source is opened.

placeholder
stringDefault "Search the docs…"
className
string

Extra classes for the root element.

DocSection

idrequired
string
pagerequired
string

Page the section lives on, such as "Webhooks".

headingrequired
string
textrequired
string

Searchable body text.

summaryrequired
string

One plain sentence the answer can quote for this section.

hrefrequired
string

Dependencies

cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


04Run TraceNew, Oct 25

One agent run as a waterfall: model calls, tool calls and retrievals stream in on the run's own clock, so parallel calls sit side by side and a timeout stands out. Hover to read the clock, click a span for its input, output, tokens and cost, and collapse a step into one bar that still shows where its children ran.

Install with
lucide-react, motion
Usage and propsReal data, 6 props, 5 dependencies

Usage

Pass the spans your tracer recorded, in tree order. While the run is going, pass elapsed and leave duration off the open spans so they grow to it; once it's done, pass live={false} to show it whole.

trace.tsx
"use client";

import RunTrace, { type TraceSpan } from "@/components/kokonutui-pro/run-trace";

// One span from your tracing store (for an AI SDK run, the OpenTelemetry
// spans from `experimental_telemetry: { isEnabled: true }`).
interface StoredSpan {
  id: string;
  parentId?: string;
  name: string;
  kind: TraceSpan["kind"];
  startedAt: number;
  endedAt?: number;
  error?: string;
}

const toSpan = (span: StoredSpan, runStart: number): TraceSpan => ({
  id: span.id,
  parentId: span.parentId,
  kind: span.kind,
  name: span.name,
  start: span.startedAt - runStart,
  duration: span.endedAt ? span.endedAt - span.startedAt : undefined,
  status: span.error ? "error" : "ok",
  error: span.error,
});

export function Trace({
  spans,
  runStart,
  running,
}: {
  spans: StoredSpan[];
  runStart: number;
  running: boolean;
}) {
  return (
    <RunTrace
      elapsed={running ? Date.now() - runStart : undefined}
      live={false}
      spans={spans.map((span) => toSpan(span, runStart))}
    />
  );
}

Props

spans
TraceSpan[]
elapsed
number

Milliseconds since your run began. Pass it to draw a run as it stands, with no replay: open spans grow to it and pulse as running.

live
booleanDefault true

Demo: play the run in as it streams. Defaults to true.

defaultSelected
string

The span whose details are open at first.

onSelect
(span: TraceSpan) => void
className
string

Extra classes for the root element.

TraceSpan

idrequired
string
parentId
string

The span this one ran inside. Leave out for the run itself.

kindrequired
SpanKind
namerequired
string
startrequired
number

Milliseconds from the start of the run.

duration
number

Leave out while the span runs; it grows to elapsed until you set it.

status
"ok" | "error"
tag
string

Shown beside the name, such as "retry 1".

model
string
tokensIn
number
tokensOut
number
cost
number

In US dollars.

input
string
output
string
error
string

What went wrong, for a span with status "error".

SpanKind

type SpanKind = "agent" | "model" | "tool" | "retrieval";

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


05Tool PermissionsNew, Oct 25

Allow, Ask or Block for every tool an agent can reach, grouped by connected server and tagged as reads, writes or destructive. Setting a whole server to Allow leaves its destructive tools as they were until you say so, and changed tools show what they were until Save.

Install with
lucide-react, motion
Usage and props4 props, 5 dependencies

Props

agent
stringDefault "Support agent"

Whose permissions these are, shown in the header.

servers
ToolServer[]Default demo data
onSave
(changes: PermissionChange[]) => Promise<void> | void
className
string

Extra classes for the root element.

ToolServer

idrequired
string
namerequired
string
monogramrequired
string

Two letters for the server's tile.

colorrequired
string

Background of the tile, any CSS color.

toolsrequired
AgentTool[]

PermissionChange

serverrequired
string
toolrequired
string
fromrequired
Permission
torequired
Permission

AgentTool

idrequired
string
namerequired
string
descriptionrequired
string
effectrequired
ToolEffect
permissionrequired
Permission

Permission

type Permission = "allow" | "ask" | "block";

ToolEffect

type ToolEffect = "read" | "write" | "destructive";

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


06Knowledge SourcesNew, Oct 25

The files an assistant answers from, each drawn as its chunks. Cells fill in as a file is embedded, a scanned PDF says it needs OCR, and a test question lights up the chunks it would retrieve with their scores and matched words. Add the missing source and the ranking moves to make room.

Install with
lucide-react, motion
Usage and propsReal data, 9 props, 5 dependencies

Usage

Pass your sources with indexed counting up while each one embeds, and search to run the test question against your real index. Add source and the fix button call onAdd and onFix, so they open your own picker and re-run your own pipeline.

sources.tsx
"use client";

import KnowledgeSources, {
  type KnowledgeSearch,
  type KnowledgeSource,
} from "@/components/kokonutui-pro/knowledge-sources";

const search: KnowledgeSearch = async (query, sources, topK, signal) => {
  const res = await fetch("/api/knowledge/search", {
    method: "POST",
    body: JSON.stringify({ query, topK, ids: sources.map((s) => s.id) }),
    signal,
  });
  if (!res.ok) {
    throw new Error("Search is unavailable right now");
  }
  // [{ sourceId, chunk, text, score, terms }]
  const hits: Hit[] = await res.json();
  return hits.flatMap((hit) => {
    const source = sources.find((s) => s.id === hit.sourceId);
    return source
      ? [
          {
            source,
            passage: { chunk: hit.chunk, text: hit.text },
            score: hit.score,
            terms: hit.terms,
          },
        ]
      : [];
  });
};

export function Sources({ sources }: { sources: KnowledgeSource[] }) {
  return (
    <KnowledgeSources
      name="Help center"
      onAdd={openFilePicker}
      onFix={(source) => reindex(source.id, { ocr: true })}
      search={search}
      sources={sources}
    />
  );
}

On the server, embed the question with the AI SDK and rank by cosine similarity (or let your vector database do it):

app/api/knowledge/search/route.ts
import { openai } from "@ai-sdk/openai";
import { cosineSimilarity, embed } from "ai";

export async function POST(req: Request) {
  const { query, topK, ids } = await req.json();
  const { embedding } = await embed({
    model: openai.textEmbeddingModel("text-embedding-3-small"),
    value: query,
  });
  const chunks = await loadChunks(ids); // [{ sourceId, chunk, text, embedding }]
  const hits = chunks
    .map((c) => ({ ...c, score: cosineSimilarity(embedding, c.embedding) }))
    .filter((c) => c.score >= 0.4)
    .sort((a, b) => b.score - a.score)
    .slice(0, topK)
    .map(({ embedding: _, ...hit }) => ({ ...hit, terms: [] }));
  return Response.json(hits);
}

Props

name
stringDefault "Help center"

Shown in the header.

sources
KnowledgeSource[]Default demo data
incoming
KnowledgeSource[]Default demo data

Files "Add source" brings in, one per click, for the demo.

defaultQuery
stringDefault "Can I return a gift without a receipt?"
retrieve
(query: string, sources: KnowledgeSource[], topK: number) => RetrievedChunk[]Default wordOverlap

Replaces the built-in word overlap scoring, in the browser.

search
KnowledgeSearch

A real search: runs the test question against your index.

onAdd
() => void

Live: Add source opens your own picker. Leave it out for the demo files.

onFix
(source: KnowledgeSource) => void

Live: the fix button on a failed source, such as a retry with OCR.

className
string

Extra classes for the root element.

KnowledgeSource

idrequired
string
namerequired
string
kindrequired
"pdf" | "md" | "html" | "docx"
chunksrequired
number

How many chunks the file splits into.

passagesrequired
SourcePassage[]

The chunks with text to match against.

error
string

A source that couldn't be read, and why.

fix
string

The button that fixes the error, such as "Retry with OCR".

indexed
number

Live: chunks embedded so far. Below chunks, the source shows as embedding. Leave it out for a source that's ready.

RetrievedChunk

sourcerequired
KnowledgeSource
passagerequired
SourcePassage
scorerequired
number
termsrequired
string[]

KnowledgeSearch

type KnowledgeSearch = (query: string, sources: KnowledgeSource[], topK: number, signal: AbortSignal) => Promise<RetrievedChunk[]>;

SourcePassage

chunkrequired
number

Position of the chunk in its file, from 0.

textrequired
string

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


07Prompt TemplateNew, Oct 25

A versioned prompt where every {{variable}} is tinted in place and gets its own field, added and removed as you type. Point at a field to see where it's used, switch to Preview for the prompt the model gets, and save the edit as the next version.

Install with
lucide-react, motion
Usage and props5 props, 5 dependencies

Props

name
stringDefault "support/refund-reply"

The prompt's key, shown in the header.

versions
PromptVersion[]Default demo data

Newest first.

defaultValues
Record<string, string>Default demo data
onSave
(template: string) => Promise<void> | void
className
string

Extra classes for the root element.

PromptVersion

versionrequired
number
templaterequired
string
noterequired
string

What changed, shown in the version menu.

daterequired
string

When it was saved, as shown.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


08Plan ReviewNew, Oct 25

The plan an agent writes before it starts: drag or arrow-key steps into order, rename, skip or add them, or ask for changes and see what the agent added. Approve runs it step by step, and steps that ask first wait for Run or Skip.

Install with
lucide-react, motion
Usage and propsReal data, 6 props, 5 dependencies

Usage

Pass the agent's plan as steps. revise sends the person's note and resolves with the new plan (steps with new ids are marked Added), and runStep runs one approved step for real; a throw stops the run on that step with its message.

plan.tsx
"use client";

import PlanReview, { type PlanStep } from "@/components/kokonutui-pro/plan-review";

const post = async (path: string, body: unknown, signal: AbortSignal) => {
  const res = await fetch(path, {
    method: "POST",
    body: JSON.stringify(body),
    signal,
  });
  if (!res.ok) {
    throw new Error((await res.text()) || "Request failed");
  }
  return res.json();
};

export function Plan({ task, steps }: { task: string; steps: PlanStep[] }) {
  return (
    <PlanReview
      onApprove={(approved) => console.info("running", approved.length)}
      revise={(current, note, signal) =>
        post("/api/plan/revise", { task, steps: current, note }, signal)
      }
      runStep={(step, signal) => post("/api/plan/run", { step }, signal)}
      steps={steps}
      task={task}
    />
  );
}

On the server, generateObject with a step schema writes and revises the plan:

app/api/plan/revise/route.ts
import { anthropic } from "@ai-sdk/anthropic";
import { generateObject } from "ai";
import { z } from "zod";

export async function POST(req: Request) {
  const { task, steps, note } = await req.json();
  const { object } = await generateObject({
    model: anthropic("claude-sonnet-5-5"),
    schema: z.object({
      steps: z.array(
        z.object({
          id: z.string(),
          title: z.string(),
          detail: z.string().optional(),
          asks: z.boolean().optional(),
        })
      ),
    }),
    prompt: `Task: ${task}\nPlan: ${JSON.stringify(steps)}\nRevise it: ${note}\nKeep ids of steps you keep; new steps get new ids.`,
    abortSignal: req.signal,
  });
  return Response.json(object.steps);
}

Props

task
stringDefault "Move billing emails to the new template"
steps
PlanStep[]Default demo data

The agent's plan. Edits stay inside the component until approved.

onApprove
(steps: PlanStep[]) => void

Called with the steps that will run, in order.

runStep
(step: PlanStep, signal: AbortSignal) => Promise<void>

Runs one step and resolves when it's done. A throw stops the run with the error on that step. Leave it out and steps run on timers.

revise
(steps: PlanStep[], note: string, signal: AbortSignal) => Promise<PlanStep[]>

Sends the person's note and resolves with the revised plan. Steps with new ids are marked as added. Leave it out for the demo agent.

className
string

Extra classes for the root element.

PlanStep

idrequired
string
titlerequired
string
detail
string

One line on how, such as the files or command.

asks
boolean

Stop and wait for a person before this step runs.

ms
number

How long it takes in the demo, in milliseconds.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


09Streaming TextNew, Oct 25

An answer as it streams in. Words arrive in small uneven bursts and come into focus from a soft blur instead of popping in, with a caret riding the end. Stop freezes it where it is, and Continue picks up from the next word.

Install with
motion
Usage and propsReal data, 7 props, 4 dependencies

Usage

Pass the answer as it grows and where the stream is. New words blur in as they arrive, and Stop calls your stop.

answer.tsx
"use client";

import { useChat } from "@ai-sdk/react";
import { useState } from "react";
import StreamingText, {
  type StreamStatus,
} from "@/components/kokonutui-pro/streaming-text";

export function Answer() {
  const { messages, status, stop } = useChat();
  const [stopped, setStopped] = useState(false);
  const reply = messages.findLast((m) => m.role === "assistant");
  const text = (reply?.parts ?? [])
    .map((part) => (part.type === "text" ? part.text : ""))
    .join("");

  let streamStatus: StreamStatus = stopped ? "stopped" : "done";
  if (status === "submitted" || status === "streaming") {
    streamStatus = "streaming";
  }

  return (
    <StreamingText
      onStop={() => {
        setStopped(true);
        stop();
      }}
      status={streamStatus}
      text={text}
    />
  );
}

Props

text
stringDefault demo data

The answer. Live, pass the text so far each time it grows.

status
StreamStatus

Pass it to follow your own stream: new words blur in as text grows, with the caret while streaming. Leave it out and the text plays in on its own.

onStop
() => void

Live: shows Stop while streaming. Wire it to useChat's stop.

streaming
booleanDefault true

Demo: stream the text in. Defaults to true.

controls
booleanDefault true

Demo: show Stop, Continue and Replay under the text. Defaults to true.

onDone
() => void

Demo: called when the text has played in.

className
string

Extra classes for the root element.

StreamStatus

Where a real stream is, as the AI SDK's useChat reports it.

type StreamStatus = "streaming" | "done" | "stopped";

Dependencies

motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


10ReasoningNew, Oct 25

While a model thinks, its thoughts rise through a short window that fades at the top, and the seconds roll over like a counter. When the answer arrives the window folds into "Thought for 9s", which opens back into the full trace.

Install with
lucide-react, motion
Usage and props6 props, 5 dependencies

Props

steps
string[]

The reasoning so far, one thought per entry.

thinking
boolean

True while the model is still thinking. Omit to play the demo.

seconds
number

Seconds it took, once done. Counted on screen when omitted.

defaultOpen
booleanDefault false

Open the full reasoning once it's done.

children
ReactNode

The answer, shown under the reasoning once thinking is done.

className
string

Extra classes for the root element.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


11Response FeedbackNew, Oct 25

The row under an answer: Copy, thumbs up, thumbs down and Retry. A thumbs down turns the row itself into a one-line "What went wrong?" field, with the thumb moving into it. Enter sends and the field folds back into the row.

Install with
lucide-react, motion
Usage and props6 props, 5 dependencies

Props

answer
stringDefault demo data

The answer the row sits under. Copy copies this text.

children
ReactNode

Rendered in place of the answer text, such as formatted markdown.

placeholder
stringDefault "What went wrong?"

Placeholder for the field a thumbs down opens.

onFeedback
(result: FeedbackResult | null) => void
onRetry
() => void
className
string

Extra classes for the root element.

FeedbackResult

ratingrequired
Rating
noterequired
string

Rating

type Rating = "up" | "down";

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


12Eval GridNew, Oct 25

A prompt change run against its test suite. Cases resolve out of order as workers pick them up, and each is read against the old prompt, so regressions and fixes stand out even when the score doesn't move. Pick a cell for both outputs and the grader's reason.

Install with
lucide-react, motion
Usage and propsReal data, 8 props, 5 dependencies

Usage

Pass your cases with the baseline results, and runCase to run one against the prompt under test. Run calls it a few at a time, cells fill as results land, and a throw counts as a failed case with the error as its reason.

evals.tsx
"use client";

import EvalGrid, {
  type EvalCase,
  type EvalResult,
} from "@/components/kokonutui-pro/eval-grid";

async function runCase(
  testCase: EvalCase,
  signal: AbortSignal
): Promise<EvalResult> {
  const res = await fetch("/api/evals/run", {
    method: "POST",
    body: JSON.stringify({
      input: testCase.input,
      expected: testCase.expected,
    }),
    signal,
  });
  if (!res.ok) {
    throw new Error(`Run failed: ${res.status}`);
  }
  // { pass, output, reason?, latencyMs }, graded on the server.
  return await res.json();
}

export function Evals({ cases }: { cases: EvalCase[] }) {
  return (
    <EvalGrid
      baselineVersion="v13"
      cases={cases}
      runCase={runCase}
      version="v14"
      workers={4}
    />
  );
}

A route that answers with the AI SDK and grades the output:

app/api/evals/run/route.ts
import { anthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";

export async function POST(req: Request) {
  const { input, expected } = await req.json();
  const started = Date.now();
  const { text } = await generateText({
    model: anthropic("claude-sonnet-5-5"),
    system: SYSTEM_PROMPT_V14,
    prompt: input,
    abortSignal: req.signal,
  });
  const pass = await grade(text, expected);
  return Response.json({
    pass,
    output: text,
    reason: pass ? undefined : "Didn't match the expected answer",
    latencyMs: Date.now() - started,
  });
}

Props

title
stringDefault "Support agent"
cases
EvalCase[]Default built-in
version
stringDefault "v13"

The prompt under test.

baselineVersion
stringDefault "v12"

The prompt it's compared with.

workers
numberDefault 4

Cases that run at the same time.

runCase
(testCase: EvalCase, signal: AbortSignal) => Promise<EvalResult>

Runs one case against the prompt under test and resolves with its result. A throw counts as a failed case, with the error as the reason. Leave it out to simulate runs from the results passed in.

onRun
() => void

Called when a run starts.

className
string

Extra classes for the root element.

EvalCase

idrequired
string
suiterequired
string

The row it sits in, e.g. "Refunds".

inputrequired
string

What the test sends, usually the user's message.

expectedrequired
string
currentrequired
EvalResult
baselinerequired
EvalResult

EvalResult

passrequired
boolean
outputrequired
string
reason
string

The grader's note, shown when the case fails.

latencyMsrequired
number

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


13Enrich TableNew, Oct 25

A list of companies with one AI column. Fill answers it row by row, says when it found nothing, and every answer shows the sentence it was read from on hover.

Install with
lucide-react, motion
Usage and propsReal data, 9 props, 5 dependencies

Usage

Pass your rows and a lookup that answers the column's question for one row. Fill runs it two rows at a time (concurrency to change that), each answer keeps its source for the hover card, and a lookup that throws shows its message in the cell.

leads.tsx
"use client";

import EnrichTable, {
  type EnrichLookup,
  type EnrichRow,
} from "@/components/kokonutui-pro/enrich-table";

const lookup: EnrichLookup = async (row, prompt, signal) => {
  const res = await fetch("/api/enrich", {
    method: "POST",
    body: JSON.stringify({ domain: row.domain, prompt }),
    signal,
  });
  if (!res.ok) {
    throw new Error("Lookup failed");
  }
  // { answer: string | null, source?: { url, quote, highlight? } }
  return await res.json();
};

export function Leads({ rows }: { rows: EnrichRow[] }) {
  return (
    <EnrichTable
      column="Employees"
      lookup={lookup}
      onFilled={(answers) => saveColumn("employees", answers)}
      prompt="How many people work here?"
      rows={rows}
    />
  );
}

A route that reads the company's site with a structured answer, so the quote it came from travels with it:

app/api/enrich/route.ts
import { anthropic } from "@ai-sdk/anthropic";
import { generateObject } from "ai";
import { z } from "zod";

export async function POST(req: Request) {
  const { domain, prompt } = await req.json();
  const pages = await fetchPages(domain); // your crawler or search API
  const { object } = await generateObject({
    model: anthropic("claude-sonnet-5-5"),
    schema: z.object({
      answer: z.string().nullable(),
      source: z
        .object({
          url: z.string(),
          quote: z.string(),
          highlight: z.string().optional(),
        })
        .optional(),
    }),
    prompt: `${prompt}\nAnswer null if the pages don't say.\n\n${pages}`,
    abortSignal: req.signal,
  });
  return Response.json(object);
}

Props

title
stringDefault "Leads"
column
stringDefault "Employees"

The AI column's name.

prompt
stringDefault "How many people work here?"

The question asked for every row.

rows
EnrichRow[]Default demo data

Live, rows can leave answer out; the lookup fills it.

lookup
EnrichLookup

Fills one row. Leave it out and the rows' own answers play in.

concurrency
numberDefault built-in

Rows looked up at once. Defaults to 2.

onFill
() => void

Called when a fill starts.

onFilled
(answers: Record<string, EnrichAnswer>) => void

Called with every row's answer once a fill ends.

className
string

Extra classes for the root element.

EnrichRow

idrequired
string
namerequired
string
domainrequired
string
answer
string | null

Demo: the answer to play in, null when nothing was found. Live, leave it out.

source
EnrichSource

EnrichLookup

type EnrichLookup = (row: EnrichRow, prompt: string, signal: AbortSignal) => Promise<EnrichAnswer>;

EnrichAnswer

What a lookup found for one row.

answerrequired
string | null

null when nothing was found.

source
EnrichSource

EnrichSource

urlrequired
string
quoterequired
string

The sentence the answer was read from.

highlight
string

The part of the quote that answers the question.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


14Agent InboxNew, Oct 25

The background tasks a team's agents are working through, sorted by what they need from you. Questions are answered in the row, and tasks slide between Needs you, Running and Done as they move. Open one for its step log.

Install with
lucide-react, motion
Usage and propsReal data, 4 props, 5 dependencies

Usage

Give each task live with where it really is: its status, the step it's on and when it started (the clock counts from it). Tasks with live aren't simulated. Return the Promise from onAnswer so the choices wait while the answer is sent.

inbox.tsx
"use client";

import AgentInbox, { type AgentTask } from "@/components/kokonutui-pro/agent-inbox";

// Your background runs, e.g. from a jobs table polled or pushed over SSE.
interface Run {
  id: string;
  title: string;
  repo: string;
  steps: string[];
  step: number;
  status: "running" | "needs" | "done" | "failed";
  startedAt: number;
  endedAt?: number;
  question?: { text: string; options: string[] };
  result?: string;
  error?: string;
}

const toTask = (run: Run): AgentTask => ({
  id: run.id,
  title: run.title,
  place: run.repo,
  steps: run.steps,
  result: run.result ?? "",
  ask: run.question
    ? { atStep: run.step, question: run.question.text, options: run.question.options }
    : undefined,
  live: {
    status: run.status,
    step: run.step,
    startedAt: run.startedAt,
    endedAt: run.endedAt,
    error: run.error,
  },
});

export function Inbox({ runs }: { runs: Run[] }) {
  return (
    <AgentInbox
      onAnswer={async (id, answer) => {
        const res = await fetch(`/api/runs/${id}/answer`, {
          method: "POST",
          body: JSON.stringify({ answer }),
        });
        if (!res.ok) {
          throw new Error("The agent didn't get that, try again");
        }
      }}
      tasks={runs.map(toTask)}
    />
  );
}

Props

title
stringDefault "Agents"
tasks
AgentTask[]Default built-in
onAnswer
(taskId: string, answer: string) => void | Promise<void>

Called with a task's answer. Return a Promise to hold the choices until it settles; a rejection shows its message under them.

className
string

Extra classes for the root element.

AgentTask

idrequired
string
titlerequired
string
placerequired
string

Where it runs, e.g. a repo or a workspace.

stepsrequired
string[]
ask
AgentTaskAsk
resultrequired
string

What came out of it, shown once done.

stepSeconds
number

Seconds each step takes in the demo.

start
{ step: number; elapsed?: number; done?: string }

Demo: where the task is when the inbox opens.

live
AgentTaskLive

Live: where the task really is. Leave it out to simulate it.

AgentTaskAsk

atSteprequired
number

The step the agent stops at to ask.

questionrequired
string
optionsrequired
string[]

AgentTaskLive

statusrequired
"running" | "needs" | "done" | "failed"
steprequired
number

The step it's on, from 0.

startedAtrequired
number

When it started, in milliseconds since the epoch.

endedAt
number

When it ended, for a done or failed task.

answer
string

The answer it was given, shown in the step log.

error
string

Why it failed.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


15Reply CopilotNew, Oct 25

A suggested support reply that writes itself in. Sourced sentences end with their article's number, and switching tone only fades in the words that change.

Install with
lucide-react, motion
Usage and propsReal data, 8 props, 5 dependencies

Usage

Stream the draft in with streamObject and pass the sentences as they grow, with drafting until it's done. rewrite writes the draft in a tone it doesn't have yet; tones already in each sentence's text switch at once.

copilot.tsx
"use client";

import { experimental_useObject as useObject } from "@ai-sdk/react";
import { useEffect } from "react";
import { z } from "zod";
import ReplyCopilot, {
  type CopilotSentence,
  type CopilotSource,
} from "@/components/kokonutui-pro/reply-copilot";

const draftSchema = z.object({
  sentences: z.array(
    z.object({ id: z.string(), text: z.string(), cite: z.string().optional() })
  ),
});

export function Copilot({
  ticketId,
  sources,
}: {
  ticketId: string;
  sources: CopilotSource[];
}) {
  const { object, isLoading, submit } = useObject({
    api: "/api/reply/draft",
    schema: draftSchema,
  });
  useEffect(() => submit({ ticketId, tone: "friendly" }), [ticketId, submit]);

  const sentences: CopilotSentence[] = (object?.sentences ?? []).flatMap((s) =>
    s?.id && s.text
      ? [{ id: s.id, cite: s.cite, text: { friendly: s.text } }]
      : []
  );

  return (
    <ReplyCopilot
      drafting={isLoading}
      onUse={(text) => insertIntoComposer(text)}
      rewrite={async (tone, current, signal) => {
        const res = await fetch("/api/reply/rewrite", {
          method: "POST",
          body: JSON.stringify({ tone, sentences: current }),
          signal,
        });
        if (!res.ok) {
          throw new Error("Couldn't rewrite the reply");
        }
        return await res.json(); // [{ id, text }]
      }}
      sentences={sentences}
      sources={sources}
    />
  );
}

Props

subject
stringDefault "Priya Shah · Cracked blender jar"

Who the reply is to and what about.

sentences
CopilotSentence[]Default built-in
sources
CopilotSource[]Default built-in
tones
{ id: string; label: string }[]Default built-in
drafting
booleanDefault false

Live: the draft is still streaming in, so Use waits.

rewrite
(tone: string, sentences: CopilotSentence[], signal: AbortSignal) => Promise<{ id: string; text: string }[]>

Live: writes the draft in a tone it doesn't have yet. Resolve with the sentences in that tone, keyed by the same ids; a rejection keeps the current tone and shows the error.

onUse
(text: string) => void
className
string

Extra classes for the root element.

CopilotSentence

idrequired
string
textrequired
Record<string, string>

The sentence in each tone, keyed by tone id.

cite
string

The article it comes from.

CopilotSource

idrequired
string
titlerequired
string
urlrequired
string

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


16Chat HistoryNew, Oct 25

The conversation sidebar of an AI chat app, grouped by day. A new chat waits for its first answer, then writes in the title the model gave it.

Install with
lucide-react, motion
Usage and propsReal data, 7 props, 5 dependencies

Usage

Pass your chats and onNewChat. Add the new chat with title: null and it waits with a spinner; set the title once the model has named it and it types itself in. Return the new id from onNewChat to select it.

sidebar.tsx
"use client";

import { useState } from "react";
import ChatHistory, { type ChatSummary } from "@/components/kokonutui-pro/chat-history";

export function Sidebar({ initial }: { initial: ChatSummary[] }) {
  const [chats, setChats] = useState(initial);

  // Call this after the first answer: name the chat from it.
  const nameChat = async (id: string, firstMessage: string) => {
    const res = await fetch("/api/chats/title", {
      method: "POST",
      body: JSON.stringify({ message: firstMessage }),
    });
    const { title } = await res.json();
    setChats((list) => list.map((c) => (c.id === id ? { ...c, title } : c)));
  };

  return (
    <ChatHistory
      chats={chats}
      onNewChat={() => {
        const id = crypto.randomUUID();
        setChats((list) => [{ id, title: null, daysAgo: 0 }, ...list]);
        return id;
      }}
      onSelect={(id) => openChat(id)}
    />
  );
}
app/api/chats/title/route.ts
import { anthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";

export async function POST(req: Request) {
  const { message } = await req.json();
  const { text } = await generateText({
    model: anthropic("claude-haiku-5-5"),
    prompt: `Name this chat in at most five words, no quotes:\n\n${message}`,
  });
  return Response.json({ title: text.trim() });
}

Props

chats
ChatSummary[]Default demo data
active
string

The open chat. Leave it out to keep the selection inside.

defaultActive
string
onSelect
(id: string) => void
onNewChat
() => unknown

Live: called by New chat. Add the chat to chats yourself, and return its id to select it. Leave it out for the demo.

newTitles
string[]Default demo data

Demo: titles handed to new chats, in turn.

className
string

Extra classes for the root element.

ChatSummary

idrequired
string
titlerequired
string | null

null while the model is still naming the chat.

daysAgorequired
number

Days since the last message: 0 is today.

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


17Steer ComposerNew, Oct 25

An agent thread whose composer steers the run while it works. A steer waits above the input until the next step, then moves into the thread where the agent read it, and the remaining steps change to match.

Install with
lucide-react, motion
Usage and propsReal data, 13 props, 5 dependencies

Usage

Pass the thread as your agent loop reports it, with status. While it runs, a message steers instead of sending: onSteer gets the text and an id. Queue it, hand it to the model at the next step, and add a steer item with that id once it's read, so the note flies from the composer into the thread.

agent.tsx
"use client";

import { useState } from "react";
import SteerComposer, {
  type SteerItem,
  type SteerStatus,
} from "@/components/kokonutui-pro/steer-composer";

export function Agent() {
  const [items, setItems] = useState<SteerItem[]>([]);
  const [status, setStatus] = useState<SteerStatus>("done");
  const [error, setError] = useState<string>();

  const send = async (text: string) => {
    setItems([{ kind: "user", id: crypto.randomUUID(), text }]);
    setStatus("running");
    setError(undefined);
    try {
      // Your loop: push a step item as each tool call starts, mark it done
      // when it ends, and a note item for the final answer.
      await runAgent(text, (item) => setItems((list) => upsert(list, item)));
      setStatus("done");
    } catch (err) {
      setError(err instanceof Error ? err.message : "The run failed.");
      setStatus("error");
    }
  };

  return (
    <SteerComposer
      error={error}
      items={items}
      onSend={send}
      onSteer={(text, id) => steerQueue.push({ id, text })}
      onStop={() => abortAgent()}
      status={status}
    />
  );
}

With the AI SDK, read the queue between steps in prepareStep:

lib/agent.ts
import { anthropic } from "@ai-sdk/anthropic";
import { streamText } from "ai";

export const steerQueue: { id: string; text: string }[] = [];

const result = streamText({
  model: anthropic("claude-sonnet-5-5"),
  tools,
  messages,
  prepareStep: ({ messages }) => {
    const steer = steerQueue.shift();
    if (!steer) {
      return;
    }
    onItem({ kind: "steer", id: steer.id, text: steer.text });
    return { messages: [...messages, { role: "user", content: steer.text }] };
  },
});

Props

items
SteerItem[]

Live: the thread so far, as your agent loop reports it. Leave it out and the demo run plays.

status
SteerStatus

Live: where the run is. Steer replaces Send while it's running.

error
string

Live: why the run failed, shown at the end of the thread.

onSend
(text: string) => void

Called with a new message once the run has ended.

onSteer
(text: string, id: string) => void

Called with a steer and the id it waits under. Add a steer item with that id when the agent reads it.

onStop
() => void

Live: shows Stop while running.

prompt
stringDefault "Add rate limiting to the /api/upload route."

Demo: the first message, sent when the thread opens.

steps
string[]Default demo data

Demo: the steps the run plays.

result
stringDefault "Done. Uploads are limited to 10 a minute per I…

Demo: said when the run ends.

acknowledgement
stringDefault "Got it, changing course. Redoing the remaining…

Demo: said when a steer is picked up.

steeredSteps
string[]Default demo data

Demo: the steps that replace what's left after a steer.

steeredResult
stringDefault "Done. Uploads are limited to 10 a minute per I…

Demo: said when a steered run ends.

className
string

Extra classes for the root element.

SteerItem

One line of the thread.

type SteerItem =
  | { kind: "user"; id: string; text: string }
  | { kind: "step"; id: string; text: string; state: "active"
  | "done"
  | "stopped" }
  | { kind: "steer"; id: string; text: string }
  | { kind: "note"; id: string; text: string };

SteerStatus

type SteerStatus = "running" | "done" | "stopped" | "error";

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


18Double ComposerNew, Oct 25

The prompt box of a coding agent in two layers: the card holds the prompt, model, effort and access, and a tray tucked under it holds the machine and branch. Moving the work to the cloud turns the branch remote in place.

Install with
lucide-react, motion
Usage and propsReal data, 9 props, 5 dependencies

Usage

onSubmit gets the text and every choice. Return a Promise and the tray holds "Starting on … from …" until the run has started; a rejection puts the prompt back and shows why.

composer.tsx
"use client";

import DoubleComposer from "@/components/kokonutui-pro/double-composer";

export function Composer() {
  return (
    <DoubleComposer
      branches={["main", "release/2.4"]}
      onSubmit={async (text, choices) => {
        // choices: { model, effort, access, workspace, branch }
        const res = await fetch("/api/runs", {
          method: "POST",
          body: JSON.stringify({ prompt: text, ...choices }),
        });
        if (!res.ok) {
          throw new Error("No cloud runner is free right now");
        }
      }}
    />
  );
}

Props

placeholder
stringDefault "Ask for changes, send follow-ups, or attach im…
models
ComposerOption[]Default built-in
efforts
ComposerOption[]Default built-in
access
ComposerOption[]Default built-in
workspaces
ComposerOption[]Default built-in

Where the run happens; an option with id "cloud" makes branches remote.

branches
string[]Default built-in
defaults
Partial<ComposerChoices>
onSubmit
(text: string, choices: ComposerChoices) => void | Promise<void>

Return a Promise to show Starting until the run has started.

className
string

Extra classes for the root element.

ComposerOption

idrequired
string
labelrequired
string
icon
ComponentType<SVGProps<SVGSVGElement>>

Any icon component: a lucide icon or a brand logo.

hint
string

ComposerChoices

modelrequired
string
effortrequired
string
accessrequired
string
workspacerequired
string
branchrequired
string

Dependencies

lucide-react^1.27.0npm, installed by the CLI
motion^12.23.12npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.


19Dither Voice OrbNew, Nov 12

The face of a voice agent, drawn as a lit sphere in ordered dither. Tap it to talk: a ring of dots swells with your voice while it listens, the light swings round while it thinks, and the surface ripples with each word as the reply writes out underneath. Pass getLevel to drive it from real audio.

Install with
no extra packages
Usage and props7 props, 3 dependencies

Props

name
stringDefault "Juniper"

The agent's name, above the orb.

turns
VoiceOrbTurn[]Default built-in

Turns played in order, one per tap.

getLevel
() => number

Live input or output level, 0 to 1. Replaces the simulated one.

accent
stringDefault "#ff5a1f"

Colour of the highlight and the listening ring.

size
numberDefault 228

Orb diameter in CSS pixels.

onPhaseChange
(phase: VoiceOrbPhase) => void
className
string

Extra classes for the root element.

VoiceOrbTurn

heardrequired
string

What the person says, shown while the orb listens.

replyrequired
string

The agent's answer, written out while it speaks.

VoiceOrbPhase

type VoiceOrbPhase = "idle" | "listening" | "thinking" | "speaking";

Dependencies

cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.

PreviousTestimonialsNextCards

On this page

01Image Generation CardNew02Agent QuestionsNew03Docs SearchNew04Run TraceNew05Tool PermissionsNew06Knowledge SourcesNew07Prompt TemplateNew08Plan ReviewNew09Streaming TextNew10ReasoningNew11Response FeedbackNew12Eval GridNew13Enrich TableNew14Agent InboxNew15Reply CopilotNew16Chat HistoryNew17Steer ComposerNew18Double ComposerNew19Dither Voice OrbNew
Variation 1 of 4: A quiet valley at dusk, layered hills, low sun, muted film tones

1152 × 864·Seed 89702