AI-17AIUpdated, November 16, 2026
AI Inline Citations
An answer with source chips beside each claim. One preview glides between chips and lights up the sentence it backs.
PROSlash Command Menu and more like it are in Kokonut UI Pro
Installation
AI Inline Citations 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-citations.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/ai-citationsOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/ai-citations.tsx.
npm install lucide-react motionUsage
import AICitations from "@/components/kokonutui/ai-citations";
export default function Example() {
return <AICitations />;
}Props
partsAnswerPart[]Default demo dataThe answer, split where citations go. Demo content when omitted.
sourcesCitationSource[]Default demo dataclassNamestringExtra classes for the root element.
AnswerPart
textrequiredstringcitestring[]Ids of the sources that back this text. A chip follows it.
CitationSource
idrequiredstringtitlerequiredstringurlrequiredstringsitestringShort site name for the chip, such as MDN. Defaults to the host.
snippetstringThe passage that backs the claim, shown in the preview.
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.

