Skip to Content
Kokonut UI

AI-05AIUpdated, November 16, 2026

AI Voice

Voice input with a scrolling waveform, then a take you can play back, discard or send.

Install with
lucide-react, motion

PROSlash Command Menu and more like it are in Kokonut UI Pro

Installation

AI Voice 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-voice.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/ai-voice

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/ai-voice.tsx.

npm install lucide-react motion

Usage

import AI_Voice from "@/components/kokonutui/ai-voice";

export default function Example() {
  return <AI_Voice />;
}

Props

className
string

Extra classes for the root element.

demo
booleanDefault true

Plays a record, review and send loop until the first click.

level
number

Live input level from 0 to 1, e.g. from your own audio analyser. When omitted, the waveform plays a simulated voice.

onListeningChange
(listening: boolean) => void

Called with the new state when the user starts or stops recording.

onStop
(duration: number) => void

Called with the take's length in seconds when recording stops.

onSend
(duration: number) => void

Called when the user sends the reviewed take.

onDiscard
() => void

Called when the user throws the take away.

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
motion^12.23.25npm, 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.