Guides using the Kanpeki copy-paste component library for React. Covers installation via shadcn CLI, component patterns (simple and multi-part), form integration with React Hook Form and TanStack Form, theming, and dark mode.
Ships in frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Kanpeki is a copy-paste component library for React. Components are copied into your project (not installed as npm packages) via the shadcn CLI. Built on React Aria Components (accessibility), CVA beta (variants), and Tailwind CSS 4.1 (styling).
Docs: https://kanpeki.vercel.app
Install dependencies, create ~/lib/cva.ts, configure globals.css, then add components:
npx shadcn@latest add @kanpeki/button
Components are copied to ~/components/ui/<name>/. You own the code.
See references/installation-setup.md for full setup (deps, CVA config, globals.css, dark mode, path alias).
Each component has: index.ts (exports), <name>.tsx (implementation), styles.ts (CVA variants).
import { Button } from "~/components/ui/button"import { Dialog } from "~/components/ui/dialog" → Dialog.Root, Dialog.Content, etc.Multi-part components: Accordion, Breadcrumb, ButtonGroup, Calendar, Card, Carousel, Chart, Combobox, DateField, DatePicker, Dialog, Drawer, Field, InputGroup, ListBox, Menu, NumberField, Pagination, Popover, RadioGroup, Resizable, ScrollArea, SearchField, Select, Sheet, Sidebar, Slider, Table, Tabs, Toast, ToggleGroup, Tooltip.
Key rule: Always use composeRenderProps from react-aria-components on React Aria primitives — required for state selectors (pressed:, selected:, etc.). For plain HTML elements, call CVA directly.
See references/component-patterns.md for full examples (Button, Dialog, namespace pattern, customization).
3-layer architecture: Form > Field > Input component.
Field.Root's render prop connects to a React Aria form primitive (TextField, Select, NumberField, etc.) for automatic label association and validation.
<Form> + isRequired on primitivesAll libraries use the same Field.Root render={<Primitive>} pattern. Field.Error accepts an errors prop — undefined entries are silently ignored.
See references/form-system.md for Field/InputGroup/ButtonGroup API details.
styles.ts. Import cva from ~/lib/cva (not cva directly).cn() — class merging utility from ~/lib/cva. Wraps twMerge.globals.css via @theme inline. Use light-dark() for automatic dark mode.next-themes (class strategy) + CSS light-dark(). Components auto-switch.pressed:, selected:, disabled:, entering:, exiting:, focus-visible:.tailwindcss-motion plugin: motion-opacity-in, motion-scale-in-95, motion-duration-200.Override styles by passing className (twMerge resolves conflicts) or editing styles.ts directly.
See references/styling-and-theming.md for full token reference and CVA deep dive.
| Pitfall | Fix |
|---|---|
Using className={Styles(...)} on React Aria components | Use composeRenderProps — required for state selectors |
Missing "use client" directive | All interactive components need it (React Aria is client-only) |
Importing cva from "cva" | Import from ~/lib/cva — includes twMerge hook |
Old shadcn deps installed (class-variance-authority, clsx) | Remove them, use cva@beta + tailwind-merge |
Using active: for press state | Use pressed: — React Aria prefix |
Using @/ path alias | Kanpeki uses ~/ |
Install any component: npx shadcn@latest add @kanpeki/<name>
Layout & Structure: card, separator, aspect-ratio, resizable, scroll-area, sidebar, collapsible, carousel
Form Inputs: input, textarea, text-field, number-field, search-field, checkbox, radio-group, select, combobox, autocomplete, switch, slider, date-field, date-picker, calendar, input-otp, dropzone, field, form, input-group
Buttons & Actions: button, button-group, link, link-button, toggle, toggle-group
Overlays: dialog, drawer, sheet, popover, tooltip, menu
Data Display: table, list-box, accordion, tabs, avatar, badge, keyboard, chart
Feedback: alert, toast, progress, spinner, skeleton
Navigation: breadcrumb, pagination
Utilities: label
agents/openai.yaml (opens in a new tab)references/component-patterns.md (opens in a new tab)references/form-react-hook-form.md (opens in a new tab)references/form-system.md (opens in a new tab)references/form-tanstack-form.md (opens in a new tab)references/installation-setup.md (opens in a new tab)references/styling-and-theming.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
kanpeki, component-library, shadcn-cli, react-aria-components, cva, tailwind-css
Other plugins' skills for the same job
34 skills in this plugin
/ai-sdkAnswer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat"./baseline-uiQuickly deslop UI code by fixing spacing, hierarchy, typography, and small layout issues. Use when the interface needs a fast cleanup or polish pass./canvas-designCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations./vercel-composition-patternsReact composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes./denjiManage SVG icons as framework components using Denji CLI. Use when the user needs to add, remove, list, export, import, or manage SVG icons in React, Preact, Solid, Qwik, Vue, or Svelte projects. Triggers include requests to "add an icon", "set up icons", "manage SVG icons", "remove an icon", "list icons", "export icons", "import icons", "dry-run icon add", or any task involving Iconify icons as framework components./design-labConduct design interviews, generate five distinct UI variations in a temporary design lab, collect feedback, and produce implementation plans. Use when the user wants to explore UI design options, redesign existing components, or create new UI with multiple approaches to compare./frontend:kanpekifrom frontend
npx claudepluginhub fellipeutaka/leon --plugin frontend