component-gen
| Type | Skill |
| Plugin | awl-design · v0.0.4 |
| Invoke | /awl-design:component-gen |
| Tools | Read, Write, Edit, Bash, Glob, Grep |
| Source | plugins/awl-design/skills/component-gen/SKILL.md |
When Claude uses it
Abschnitt betitelt „When Claude uses it“Generates React, Vue, Angular, or Svelte UI components using AWL design tokens (colors, spacing, typography, shadows). Use when asked to “create component”, “build button”, “generate card”, “build form”, “create input”, or any AWL/design system component request. Outputs TypeScript components with Tailwind mappings, dark mode, and accessibility.
Trigger phrases: create component · build button · generate card · build form · create input
Definition
Abschnitt betitelt „Definition“You generate UI components that strictly follow the AWL design system. Every value must come from design tokens — no hardcoded values.
Workflow
Abschnitt betitelt „Workflow“- Read
references/design-tokens.jsonfor exact token values - Read
references/component-patterns.mdfor established patterns - Read
references/button.example.tsxfor the reference React implementation - Generate the component in the requested framework (default: React + Tailwind)
- Exact token values only — never hardcode colors, spacing, font sizes, or shadows
- All interactive states — hover, active, focus-visible, disabled
- Dark mode support — use semantic CSS variables that swap automatically, or provide explicit dark: variants
- Accessibility — focus-visible ring, minimum 48px touch targets, ARIA attributes where needed
- TypeScript — always use TypeScript with proper type definitions
- Responsive — mobile-first, use token breakpoints
Supported Frameworks
Abschnitt betitelt „Supported Frameworks“| Framework | Default styling | Reference |
|---|---|---|
| React | Tailwind CSS | button.example.tsx |
| Angular | CSS custom properties | component-patterns.md |
| Vue 3 | Tailwind or CSS vars | component-patterns.md |
| Svelte | Tailwind or CSS vars | component-patterns.md |
If the user doesn’t specify a framework, use React + Tailwind.
Component Patterns Available
Abschnitt betitelt „Component Patterns Available“- Button: primary, secondary, ghost variants; sm/md/lg sizes; loading, disabled, icon states
- Card: default, gradient, dark variants; hover lift effect
- Form/Input: text input with label, placeholder, hover/focus states
- Layout: container, grid (2/3/4 col), sticky header
Tailwind Token Mapping
Abschnitt betitelt „Tailwind Token Mapping“When generating Tailwind components, map tokens to Tailwind config extensions:
// tailwind.config.js extendcolors: { brand: { green: { 50: '#f0f6e3', /* ... */ 900: '#184300' }, cyan: { /* from tokens */ }, // ... all brand colors }, gray: { /* from tokens.colors.neutral.gray */ }},fontFamily: { sans: ['Museo Sans', 'system-ui', '-apple-system', 'sans-serif'] },spacing: { /* 4px base: 1=4px, 2=8px, ..., 24=96px */ },borderRadius: { sm: '2px', base: '4px', md: '6px', lg: '8px', xl: '12px', '2xl': '16px' },boxShadow: { /* from tokens.shadows */ },transitionDuration: { fast: '300ms', normal: '400ms', slow: '600ms', slower: '800ms' },Return the component code with:
- The component file
- A brief usage example
- Note any required Tailwind config extensions

