AI-01AIUpdated, November 16, 2026
AI Input Selector
AI chat input with a model menu, a separate Effort control, file chips you can drop or paste, a / command menu, and Stop while replying.
PROWant commands in the prompt? Slash Command Menu is in Kokonut UI Pro
Installation
AI Input Selector is a free, open-source React component in the Kokonut UI AI collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/ai-prompt.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/ai-promptOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/ai-prompt.tsx.
npm install lucide-react motionUsage
import AI_Prompt from "@/components/kokonutui/ai-prompt";
export default function Example() {
return <AI_Prompt />;
}Props
modelsPromptModel[]Default built-indefaultModelstringDefault "Claude Opus 5.5"Name of the model selected at first.
placeholderstringDefault "Ask anything. Type / for commands"headerTextstringDefault "Claude Fable 5.1 is free this weekend"One line above the box, e.g. a promo. Pass "" to hide the header.
headerActionstringDefault "Try it"Label of the header button, which switches to promotedModel.
promotedModelstringDefault "Claude Fable 5.1"The model the header talks about; its icon leads the header.
onSubmit(value: string, model: string, options: { /** The effort level, or null for a model without one. */ effort: string | null; files: File[]; signal: AbortSignal; command: PromptCommand | null }) => unknownSends the message. Return a promise to show the Stop button until it settles; signal aborts when the user presses Stop. Without it, the component plays a short pretend reply so the demo feels alive.
commandsPromptCommand[]Default built-inShown when the message starts with "/". Pass [] to turn the menu off.
onStop() => voidCalled when the user presses Stop while a reply is in progress.
onAttach(files: FileList | File[]) => voidCalled with the files picked, dropped or pasted into the prompt.
classNamestringExtra classes for the root element.
PromptModel
namerequiredstringdescriptionstringOne line under the name in the menu.
effortsstring[]Effort levels, lowest first, e.g. ["Low", "Medium", "High"]. Leave out for a model without a thinking control: the Effort button hides.
defaultEffortstringEffort to start on when the model is picked fresh.
PromptCommand
idrequiredstringlabelrequiredstringdescriptionstringiconReactNodeDependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
textarea | shadcn/ui, added by the CLI | |
dropdown-menu | shadcn/ui, added by the CLI | |
hooks/use-auto-resize-textarea.ts | Kokonut UI, copied by the CLI | |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.
AI Components
Free React components for AI chat and agents: prompt inputs, voice, tool calls and approvals, in-chat checkout and order tracking, citations and diff review.
AI Input Search
AI composer with a Tools menu (browse, investigate, draft, run code, reason), a model picker and a live trace that stacks each source's avatar as it is read.

