AI Send - React Component | Kokonut UI

AI Send

An email the assistant drafted, editable in place. Send starts a short countdown you can undo before anything goes out.

Installation

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

npx shadcn@latest add @kokonutui/ai-send

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

npm install lucide-react motion

Usage

With no draft it plays the demo. Pass draft and it draws that email; the body follows it as it streams in, until the person types in it, and Send waits while writing is true. After Send, there are undoSeconds to take it back, then onSend gets the final text. Return a Promise and it shows sending until it resolves; throw and the draft comes back with your error's message.

The model writes the draft as a tool's input; the person sends it.

Props

DraftEmail

Dependencies

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