# KokonutUI - Full Documentation > Collection of stunning UI components, free and open source, built with Next.js, React, Tailwind CSS, and Motion. Every documentation page, concatenated. Index: https://kokonutui.com/llms.txt --- # Agents > Use Kokonut UI with Claude Code, Cursor, VS Code or Codex. Connect the shadcn MCP server, add a rules file, and give your agent the docs as Markdown. Source: https://kokonutui.com/docs/agents Kokonut UI is a shadcn/ui registry, so any agent that can run the shadcn CLI can install its components. Ask for a component by name, or describe what you need, and the agent finds it, installs it with its dependencies, and edits it in your codebase like any other file. To have an agent do the whole setup, give it this prompt: ```text Set up Kokonut UI in this project by following https://kokonutui.com/setup.md ``` If you are an agent setting up Kokonut UI, follow https://kokonutui.com/setup.md. Otherwise, follow the steps below. ## Add the registry Agents install from the `@kokonutui` namespace, so add it to your `components.json` once. If you don't have one yet, run `shadcn init` first, as shown in [Installation](/docs). ```json title="components.json" { "registries": { "@kokonutui": "https://kokonutui.com/r/{name}.json" } } ``` ## Connect your editor The [shadcn MCP server](https://ui.shadcn.com/docs/mcp) lets your agent list, search and install components from any registry in `components.json`. One command sets it up for your editor: ### Claude Code ```bash npx shadcn@latest mcp init --client claude ``` Or add it by hand to `.mcp.json`: ```json title=".mcp.json" { "mcpServers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } } } ``` Restart Claude Code, then run /mcp to check that shadcn is connected. ### Cursor ```bash npx shadcn@latest mcp init --client cursor ``` Add to Cursor: cursor://anysphere.cursor-deeplink/mcp/install?name=shadcn&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJzaGFkY25AbGF0ZXN0IiwibWNwIl19 Or add it by hand to `.cursor/mcp.json`: ```json title=".cursor/mcp.json" { "mcpServers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } } } ``` Turn the server on in Cursor Settings, under MCP. ### VS Code ```bash npx shadcn@latest mcp init --client vscode ``` Add to VS Code: vscode:mcp/install?%7B%22name%22%3A%22shadcn%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22shadcn%40latest%22%2C%22mcp%22%5D%7D Or add it by hand to `.vscode/mcp.json`: ```json title=".vscode/mcp.json" { "servers": { "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] } } } ``` Open .vscode/mcp.json and click Start next to the shadcn server. ### Codex ```bash npx shadcn@latest mcp init --client codex ``` Or add it by hand to `~/.codex/config.toml`: ```toml title="~/.codex/config.toml" [mcp_servers.shadcn] command = "npx" args = ["shadcn@latest", "mcp"] ``` Restart Codex. It reads the server from your global config. Any other client that speaks the Model Context Protocol works too: point it at `npx shadcn@latest mcp`. ## Ask your agent Restart your editor, then ask in plain language. Each prompt copies. - "Show me every component in the @kokonutui registry" - "Add @kokonutui/particle-button to my project" - "Add an AI chat input with a model picker to the home page" - "Build a pricing section with @kokonutui components" The agent installs a component's shadcn/ui primitives (like `button` or `textarea`) and npm packages (like `motion` or `lucide-react`) along with it, exactly as the CLI does. ## Add a rules file A short rules file tells your agent to check Kokonut UI before building a component from scratch, and to install rather than paste code. Save it in your project under the file name shown for your editor. ### Claude Code: `CLAUDE.md` ```markdown title="CLAUDE.md" # Kokonut UI This project installs components from Kokonut UI, a shadcn/ui registry. The registry is set in components.json as "@kokonutui". - Before building an animated or interactive component from scratch, check Kokonut UI: https://kokonutui.com/llms.txt lists every component with a one-line description. - Install with the shadcn CLI, never by pasting code: npx shadcn@latest add @kokonutui/ It writes components/kokonutui/.tsx and installs its dependencies. - Installed components are project code. Edit them in place rather than wrapping them. - Any docs page is available as Markdown, with the full source, by adding .md to its URL, e.g. https://kokonutui.com/docs/buttons/particle-button.md ``` ### Cursor: `.cursor/rules/kokonutui.mdc` ```markdown title=".cursor/rules/kokonutui.mdc" --- description: Installing and editing Kokonut UI components alwaysApply: false --- # Kokonut UI This project installs components from Kokonut UI, a shadcn/ui registry. The registry is set in components.json as "@kokonutui". - Before building an animated or interactive component from scratch, check Kokonut UI: https://kokonutui.com/llms.txt lists every component with a one-line description. - Install with the shadcn CLI, never by pasting code: npx shadcn@latest add @kokonutui/ It writes components/kokonutui/.tsx and installs its dependencies. - Installed components are project code. Edit them in place rather than wrapping them. - Any docs page is available as Markdown, with the full source, by adding .md to its URL, e.g. https://kokonutui.com/docs/buttons/particle-button.md ``` ### VS Code: `.github/copilot-instructions.md` ```markdown title=".github/copilot-instructions.md" # Kokonut UI This project installs components from Kokonut UI, a shadcn/ui registry. The registry is set in components.json as "@kokonutui". - Before building an animated or interactive component from scratch, check Kokonut UI: https://kokonutui.com/llms.txt lists every component with a one-line description. - Install with the shadcn CLI, never by pasting code: npx shadcn@latest add @kokonutui/ It writes components/kokonutui/.tsx and installs its dependencies. - Installed components are project code. Edit them in place rather than wrapping them. - Any docs page is available as Markdown, with the full source, by adding .md to its URL, e.g. https://kokonutui.com/docs/buttons/particle-button.md ``` ### Codex: `AGENTS.md` ```markdown title="AGENTS.md" # Kokonut UI This project installs components from Kokonut UI, a shadcn/ui registry. The registry is set in components.json as "@kokonutui". - Before building an animated or interactive component from scratch, check Kokonut UI: https://kokonutui.com/llms.txt lists every component with a one-line description. - Install with the shadcn CLI, never by pasting code: npx shadcn@latest add @kokonutui/ It writes components/kokonutui/.tsx and installs its dependencies. - Installed components are project code. Edit them in place rather than wrapping them. - Any docs page is available as Markdown, with the full source, by adding .md to its URL, e.g. https://kokonutui.com/docs/buttons/particle-button.md ``` ## Docs for agents Every page on this site is also served as Markdown, so an agent can read the docs without a browser. Each component page includes its install command and full source. - `https://kokonutui.com/setup.md`: Setup steps written for an agent: registry, MCP server and rules file. The setup prompt points here. - `https://kokonutui.com/llms.txt`: Index of every docs page, with a one-line description and a link to its Markdown. - `https://kokonutui.com/llms-full.txt`: Every docs page in one file, component source included. Large; for agents that read it once. - `https://kokonutui.com/docs/.md`: Any docs page as Markdown, with its install command and full source. The Copy Markdown button on each page copies the same text. - `https://kokonutui.com/r/registry.json`: The shadcn registry index: every component with its dependencies and files. - `https://kokonutui.com/r/.json`: One component's registry item, the file the CLI and the MCP server install from. At the top of every page, **Copy Markdown** copies the page for a chat, and **Open** sends it to ChatGPT, Claude or Cursor. --- # Changelog > New and updated Kokonut UI components, release by release, with a link to each component and its pull request. Source: https://kokonutui.com/docs/changelog ## October 14, 2026 **New components** - [Notification Stack](https://kokonutui.com/docs/cards/notification-stack.md) (Cards, [#39](https://github.com/kokonut-labs/kokonutui/pull/39)): Stacked notifications that fan out on hover and swipe away, built with React and Tailwind CSS. - [Detent Dial](https://kokonutui.com/docs/inputs/detent-dial.md) (Inputs, [#40](https://github.com/kokonut-labs/kokonutui/pull/40)): Rotary knob that clicks from notch to notch and coasts when flicked, built with React and Motion. - [Wheel Picker](https://kokonutui.com/docs/inputs/wheel-picker.md) (Inputs, [#41](https://github.com/kokonut-labs/kokonutui/pull/41)): iOS-style 3D drum picker with flick momentum, built with React and Motion. - [Topo Background](https://kokonutui.com/docs/backgrounds/topo-background.md) (Backgrounds, [#46](https://github.com/kokonut-labs/kokonutui/pull/46)): A living contour map that drifts, rises under the cursor and ripples on click, built with React and Canvas. - [Pull Cord](https://kokonutui.com/docs/buttons/pull-cord.md) (Buttons, [#47](https://github.com/kokonut-labs/kokonutui/pull/47)): A lamp switch you pull on a swinging cord, built with React and a rope simulation. - [Liquid Gauge](https://kokonutui.com/docs/cards/liquid-gauge.md) (Cards, [#50](https://github.com/kokonut-labs/kokonutui/pull/50)): A usage meter filled with liquid that sloshes, ripples and bubbles, built with React and a wave simulation. - [Activity Terrain](https://kokonutui.com/docs/cards/activity-terrain.md) (Cards, [#51](https://github.com/kokonut-labs/kokonutui/pull/51)): A contribution heatmap that tilts up into a 3D terrain you can turn, built with React and canvas. - [Receipt Printer](https://kokonutui.com/docs/cards/receipt-printer.md) (Cards, [#52](https://github.com/kokonut-labs/kokonutui/pull/52)): A receipt that prints line by line, then tears off and falls when you pull it, built with React. - [Liquid Slider](https://kokonutui.com/docs/inputs/liquid-slider.md) (Inputs, [#53](https://github.com/kokonut-labs/kokonutui/pull/53)): A vertical slider you fill like a glass, with a sloshing surface and rising bubbles. - [Signature Pad](https://kokonutui.com/docs/inputs/signature-pad.md) (Inputs, [#54](https://github.com/kokonut-labs/kokonutui/pull/54)): A signature field with a sprung pen tip, speed-weighted ink and SVG output. - [Tear Button](https://kokonutui.com/docs/buttons/tear-button.md) (Buttons, [#55](https://github.com/kokonut-labs/kokonutui/pull/55)): A confirm button you tear off like a ticket stub, hole by hole. - [Bell Button](https://kokonutui.com/docs/buttons/bell-button.md) (Buttons, [#56](https://github.com/kokonut-labs/kokonutui/pull/56)): A subscribe button whose bell swings and rings, with a clapper that really strikes. - [Plucked Text](https://kokonutui.com/docs/texts/plucked-text.md) (Texts, [#57](https://github.com/kokonut-labs/kokonutui/pull/57)): A headline sitting on a string you can pluck, strum and let ring, built with React and real string physics. - [Marking Menu](https://kokonutui.com/docs/navigation/marking-menu.md) (Navigation, [#58](https://github.com/kokonut-labs/kokonutui/pull/58)): A radial menu you hold to open or flick to pick blind, built with React and Motion. - [Drape Background](https://kokonutui.com/docs/backgrounds/drape-background.md) (Backgrounds, [#59](https://github.com/kokonut-labs/kokonutui/pull/59)): A pleated curtain in a breeze that you can push and pull, built with React, WebGL and a cloth simulation. - [Dot Field](https://kokonutui.com/docs/backgrounds/dot-field.md) (Backgrounds, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): A halftone dot membrane that ripples behind a swipe and rings out from a click, built with React and Canvas. **Improved** - [Flick Card](https://kokonutui.com/docs/cards/card-flip.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Flick Card: drag or flick it to spin, with thickness and light that follow the angle. - [Throw Deck](https://kokonutui.com/docs/cards/card-stack.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Throw Deck: throw the top card off and it tucks back under the pile. - [Momentum Rail](https://kokonutui.com/docs/cards/carousel-cards.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Momentum Rail: drag with momentum and cover-flow depth from scroll. - [Now Playing](https://kokonutui.com/docs/cards/liquid-glass-card.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Now Playing: a spinning disc you turn to scrub the track. - [Widget Grid](https://kokonutui.com/docs/cards/bento-grid.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Widget Grid: pick up, reorder and resize widgets by pointer or keyboard. - [Dynamic Text](https://kokonutui.com/docs/texts/dynamic-text.md) (Texts, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Morph Text: letters travel, fall and land between strings, with decode and cycle modes. - [Glitch Text](https://kokonutui.com/docs/texts/glitch-text.md) (Texts, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Signal Text: flat text with sliced band glitches, on idle, hover or change. - [Extruded Text](https://kokonutui.com/docs/texts/swoosh-text.md) (Texts, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Extruded Text: 3D letters lit by the cursor that sink like keycaps. - [Wind](https://kokonutui.com/docs/backgrounds/flow-field.md) (Backgrounds, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Wind: monochrome streamlines that part around the cursor and swirl in its wake. - [Tool Dock](https://kokonutui.com/docs/navigation/toolbar.md) (Navigation, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Tool Dock: a draggable editor dock with tooltips, shortcuts and tool flyouts. - [Swipe Tabs](https://kokonutui.com/docs/navigation/smooth-tab.md) (Navigation, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Swipe Tabs: swipe the panel and the indicator follows your finger. - [Split Nav](https://kokonutui.com/docs/navigation/morphic-navbar.md) (Navigation, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Split Nav: the bar splits around the active link and you can scrub across it. - [Account Menu](https://kokonutui.com/docs/navigation/profile-dropdown.md) (Navigation, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Account Menu: the card morphs into its menu, with account switching and hold to sign out. - [Command Palette](https://kokonutui.com/docs/navigation/action-search-bar.md) (Navigation, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Rebuilt as Command Palette: nested pages, fuzzy matching and instant keyboard use. - [Avatar Picker](https://kokonutui.com/docs/inputs/avatar-picker.md) (Inputs, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Faces generated from your name, on a 3D coin you can flick or shuffle. - [Currency Transfer](https://kokonutui.com/docs/cards/currency-transfer.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Odometer amounts, a chip that carries the money across, and a progress arc. - [Typing Text](https://kokonutui.com/docs/texts/type-writer.md) (Texts, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): A caret that blinks only when idle, select-to-delete, and optional typos. - [Apple Activity Card](https://kokonutui.com/docs/cards/apple-activity-card.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Numbers count up with the rings, and rings can go past 100%. - [Notification Stack](https://kokonutui.com/docs/cards/notification-stack.md) (Cards, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Released cards spring back or fly away with your finger's speed. - [Topo Background](https://kokonutui.com/docs/backgrounds/topo-background.md) (Backgrounds, [#67](https://github.com/kokonut-labs/kokonutui/pull/67)): Elevation labels on the contour lines. - [Background Paths](https://kokonutui.com/docs/backgrounds/background-paths.md) (Backgrounds, [#48](https://github.com/kokonut-labs/kokonutui/pull/48)): Rebuilt as one flowing ribbon of lines that part around the cursor. - [Shape Hero](https://kokonutui.com/docs/backgrounds/shape-hero.md) (Backgrounds, [#49](https://github.com/kokonut-labs/kokonutui/pull/49)): Rebuilt around a pile of shapes you can drag and throw. - [AI Voice](https://kokonutui.com/docs/ai/ai-voice.md) (AI, [#60](https://github.com/kokonut-labs/kokonutui/pull/60)): A scrolling waveform, and a take you review before sending. - [AI Input Selector](https://kokonutui.com/docs/ai/ai-prompt.md) (AI, [#61](https://github.com/kokonut-labs/kokonutui/pull/61)): Attachment chips, slash commands, and Stop while it replies. - [AI State Loading](https://kokonutui.com/docs/ai/ai-loading.md) (AI, [#62](https://github.com/kokonut-labs/kokonutui/pull/62)): Agent steps with a live log, a step rail and timings. - [AI Text Loading](https://kokonutui.com/docs/ai/ai-text-loading.md) (AI, [#63](https://github.com/kokonut-labs/kokonutui/pull/63)): A letter wave instead of a gradient shimmer. - [Particle Button](https://kokonutui.com/docs/buttons/particle-button.md) (Buttons, [#25](https://github.com/kokonut-labs/kokonutui/pull/25)): Calls your onClick and onSuccess, and keeps particles inside the button. - [Gradient Button](https://kokonutui.com/docs/buttons/gradient-button.md) (Buttons, [#27](https://github.com/kokonut-labs/kokonutui/pull/27)): Correct light and dark themes, and renders its children and icon. **Across the library** - Every component now works right after shadcn add, without the docs site's styles. ([#32](https://github.com/kokonut-labs/kokonutui/pull/32)) - Fixed components whose main feature didn't work. ([#33](https://github.com/kokonut-labs/kokonutui/pull/33)) - Keyboard, focus and screen reader fixes, and reduced motion support, across the library. ([#34](https://github.com/kokonut-labs/kokonutui/pull/34), [#35](https://github.com/kokonut-labs/kokonutui/pull/35), [#36](https://github.com/kokonut-labs/kokonutui/pull/36)) --- # Installation > Install KokonutUI components in any React or Next.js project with the shadcn CLI, using namespaces or direct registry URLs. No extra setup required. Source: https://kokonutui.com/docs To have an agent do the whole setup, give it this prompt: ```text Set up Kokonut UI in this project by following https://kokonutui.com/setup.md ``` If you are an agent setting up Kokonut UI, follow https://kokonutui.com/setup.md. Otherwise, follow the steps below. ## Add the registry Kokonut UI is a shadcn/ui registry. The shadcn CLI reads its configuration from `components.json`; if your project doesn't have one yet, create it: ```bash npx shadcn@latest init ``` Then add the `@kokonutui` namespace to it, so components install by name: ```json title="components.json" { "registries": { "@kokonutui": "https://kokonutui.com/r/{name}.json" } } ``` > **Copying code instead?** > > `components.json` is only needed for the CLI. If you copy a component's source by hand, you can skip it, but you'll have to install its dependencies yourself. ## Install the utilities Components are styled with [Tailwind CSS v4](https://tailwindcss.com/docs/installation/framework-guides/nextjs), so make sure it's set up. Most of them also use the `cn` helper: ```bash npx shadcn@latest add https://kokonutui.com/r/utils.json ``` ## Add a component Name the component. The CLI writes it to `components/kokonutui/` and installs what it needs, such as [lucide-react](https://lucide.dev/guide/installation) icons, [shadcn/ui](https://ui.shadcn.com/) primitives and `motion`: ```bash npx shadcn@latest add @kokonutui/particle-button ``` Then use it like any component in your project: ```tsx title="app/page.tsx" import ParticleButton from "@/components/kokonutui/particle-button"; export default function Page() { return ; } ``` Each component page lists the packages it installs above its demo. Prefer the CLI over copying the source: it brings every file and dependency the component needs. ## Use an AI agent Claude Code, Cursor, VS Code and Codex can find and install components for you through the shadcn MCP server. See [Agents](/docs/agents) to connect your editor and add a rules file. ## Monorepos In a monorepo, pass the workspace the component belongs to with `-c`: ```bash npx shadcn@latest add @kokonutui/particle-button -c ./apps/www ``` --- # AI Input Search > AI search chat input with toggleable web search mode, file attachment and auto-resizing textarea. Built with React, Tailwind CSS and Motion. Source: https://kokonutui.com/docs/ai/ai-input-search ## Installation ```bash npx shadcn@latest add @kokonutui/ai-input-search ``` ## Source ```tsx "use client"; /** * @author: @kokonutui * @description: AI Input Search * @version: 1.0.0 * @date: 2025-06-26 * @license: MIT * @website: https://kokonutui.com * @github: https://github.com/kokonut-labs/kokonutui */ import { Globe, Paperclip, Send } from "lucide-react"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { useState } from "react"; import { Textarea } from "@/components/ui/textarea"; import { useAutoResizeTextarea } from "@/hooks/use-auto-resize-textarea"; import { cn } from "@/lib/utils"; const EASE_OUT = [0.23, 1, 0.32, 1] as const; export interface AIInputSearchProps { placeholder?: string; searchLabel?: string; /** Receives the text and whether web search was on when it was sent. */ onSubmit?: (value: string, options: { webSearch: boolean }) => void; /** Called with the files picked through the attach button. */ onFilesSelected?: (files: File[]) => void; /** Controlled web-search state. Leave unset to let the component own it. */ webSearch?: boolean; defaultWebSearch?: boolean; onWebSearchChange?: (webSearch: boolean) => void; className?: string; } export default function AI_Input_Search({ placeholder = "Search the web...", searchLabel = "Search", onSubmit, onFilesSelected, webSearch: webSearchProp, defaultWebSearch = true, onWebSearchChange, className, }: AIInputSearchProps) { const [value, setValue] = useState(""); const { textareaRef, adjustHeight } = useAutoResizeTextarea({ minHeight: 52, maxHeight: 200, }); const [uncontrolledWebSearch, setUncontrolledWebSearch] = useState(defaultWebSearch); const webSearch = webSearchProp ?? uncontrolledWebSearch; const shouldReduceMotion = useReducedMotion(); const toggleWebSearch = () => { const next = !webSearch; if (webSearchProp === undefined) { setUncontrolledWebSearch(next); } onWebSearchChange?.(next); }; const handleSubmit = () => { if (!value.trim()) { return; } onSubmit?.(value, { webSearch }); setValue(""); adjustHeight(true); }; // Mouse convenience: clicking the box around the field focuses it. Clicks // on the controls keep their own behaviour. const handleContainerClick = (target: EventTarget) => { if (target instanceof Element && target.closest("button, label, input")) { return; } textareaRef.current?.focus(); }; const canSubmit = value.trim().length > 0; return (
{/* biome-ignore lint/a11y/noStaticElementInteractions lint/a11y/useKeyWithClickEvents lint/a11y/noNoninteractiveElementInteractions: pointer-only shortcut; the textarea and buttons inside are keyboard reachable */}
handleContainerClick(e.target)} >