本文へ移動
cccskills
無料GitHub で公開

kanpeki

Use Kanpeki component library in React projects. Activate when user wants to add, use, customize, or compose accessible UI components from Kanpeki (@kanpeki/*). Triggers: shadcn CLI, copy-paste components, Field.Root, composeRenderProps, ~/components/ui/*, React Aria Components + Tailwind CSS 4.1 + CVA. Covers installation, component patterns, forms (React Hook Form, TanStack Form), theming, and dark mode.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md5.8 KB
  • references/component-patterns.md7.1 KB
  • references/form-react-hook-form.md7.6 KB
  • references/form-system.md4.2 KB
  • references/form-tanstack-form.md3.9 KB
  • references/installation-setup.md5.9 KB
  • references/styling-and-theming.md4.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Kanpeki

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

Quick Start

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).

Component Architecture

Each component has: index.ts (exports), <name>.tsx (implementation), styles.ts (CVA variants).

  • Simple components — single export: import { Button } from "~/components/ui/button"
  • Multi-part components — namespace exports: 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).

Form System

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 Library Integration

  1. Determine the form library:

All 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.

Styling & Theming

  • CVA — variant definitions in styles.ts. Import cva from ~/lib/cva (not cva directly).
  • cn() — class merging utility from ~/lib/cva. Wraps twMerge.
  • OKLCH colors — defined in globals.css via @theme inline. Use light-dark() for automatic dark mode.
  • Dark mode — next-themes (class strategy) + CSS light-dark(). Components auto-switch.
  • React Aria selectors — pressed:, selected:, disabled:, entering:, exiting:, focus-visible:.
  • Animations — 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.

Common Pitfalls

PitfallFix
Using className={Styles(...)} on React Aria componentsUse composeRenderProps — required for state selectors
Missing "use client" directiveAll 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 stateUse pressed: — React Aria prefix
Using @/ path aliasKanpeki uses ~/

Component List

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

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Implement web accessibility (a11y) best practices following WCAG guidelines to create inclusive, accessible user interfaces.

日本語の概要は準備中です。原文の説明を表示しています。

fellipeutaka/kanpeki332026年8月28日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

日本語の概要は準備中です。原文の説明を表示しています。

fellipeutaka/kanpeki332026年8月28日 更新

bun

無料

Bun runtime, package manager, bundler, and test runner. Use when running scripts with bun, managing packages, serving HTTP with Bun.serve, querying databases with Bun.sql/bun:sqlite/Bun.redis, shell scripting with $, using S3/file I/O, writing tests with bun:test, bundling or compiling to executable, or using any Bun-specific API (spawn, glob, semver, FFI, workers, plugins, HTMLRewriter).

日本語の概要は準備中です。原文の説明を表示しています。

fellipeutaka/kanpeki332026年8月28日 更新

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

日本語の概要は準備中です。原文の説明を表示しています。

fellipeutaka/kanpeki332026年8月28日 更新

denji

無料

Manage SVG icons as framework components using Denji CLI. Use when the user needs to add, remove, list, 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", or any task involving Iconify icons as framework components.

日本語の概要は準備中です。原文の説明を表示しています。

fellipeutaka/kanpeki332026年8月28日 更新

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

日本語の概要は準備中です。原文の説明を表示しています。

fellipeutaka/kanpeki332026年8月28日 更新

fellipeutaka のスキルをすべて見る

このスキルの問題を報告する