design-component
Skill: Design Component
In this project,
shadcn-ui-designis the authority for building/editing UI. Follow its rules: semantic Tailwind tokens (bg-primary,text-muted-foreground,border-border) — never hardcoded colors or raw Tailwind palette (bg-blue-600); add primitives vianpx shadcn@latest add …(don't forkcomponents/ui/*); keep the blue-primary light+dark theme. Use this skill as guidance only — any output must conform toshadcn-ui-design. Token source of truth:.claude/skills/_ux-ui-shared/tokens/*.json→ compiled toapp/globals.css.
Produce a complete component specification matching the project format.
Steps
- Read
CLAUDE.md→ "Component Guidelines" (quality bar, the 8-state table) and "Atomic Design". - Check if it already exists:
.claude/skills/_ux-ui-shared/components/atoms.md,molecules.md,organisms.md,templates.md,navigation.md,feedback.md,forms-advanced.md,overlays.md. Match the existing spec format. - Pull the ARIA pattern from
.claude/skills/_ux-ui-shared/accessibility/aria-patterns.mdand contrast/target rules from.claude/skills/_ux-ui-shared/accessibility/wcag-checklist.md. - Map every value to tokens (
.claude/skills/_ux-ui-shared/tokens/*.json) — sizes viasizing.json, states viastates.json. - Apply visual judgment from
.claude/skills/_ux-ui-shared/taste/design-taste.md(states, focus, no slop). - Optional fast start:
python3 .claude/skills/_ux-ui-shared/scripts/scaffold_component.py "<Name>"to emit a stub, then fill it in.
Output
Spec with: anatomy diagram, variants table, sizes table, all 8 applicable states, token mapping, accessibility (role/keyboard/SR), and a note to render via .claude/skills/_ux-ui-shared/frameworks/adapter-protocol.md.