Generates production-quality React or Vue components with prop types, styling, accessibility, and tests, auto-detecting project conventions.
Ships in recipe-commands. Installing the plugin adds it to Claude Code.
Generate a production-quality UI component from the description provided in $ARGUMENTS.
Extract from $ARGUMENTS:
If the description is minimal (e.g., just "Modal"), generate a fully-featured, accessible version with sensible defaults.
Search the project to determine:
.vue files). Check package.json for react, vue, next, nuxt, etc.tsconfig.json, existing file extensions.PascalCase.tsx, kebab-case.vue)Before writing code, define the component's public interface:
## Component Design: [Name]
### Props
| Prop | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| ... | ... | ... | ... | ... |
### Events / Callbacks
| Event | Payload | Description |
|-------|---------|-------------|
| ... | ... | ... |
### Slots / Children (if applicable)
| Slot | Description |
|------|-------------|
| ... | ... |
### States
- Default, Loading, Error, Empty, Disabled (as applicable)
Write the component following these quality standards:
defineProps with type annotations (Vue)<button>, <nav>, <dialog>, <table>, not generic <div> for everything)role when semantic HTML is insufficientaria-label or aria-labelledby for interactive elementsaria-expanded, aria-haspopup, aria-controls for disclosure patternsaria-live for dynamic content updatesaria-describedby for form validation errorsprefers-reduced-motion for animationsReact.memo / useMemo / useCallback where appropriate (React)computed and watch efficiently (Vue)Write tests covering:
jest-axe or vitest-axe if available)Place the test file adjacent to the component following project conventions.
If the project uses Storybook (check for .storybook/ directory or @storybook/* in dependencies), generate a story file with:
## Component Generation Report
**Component:** [Name]
**Framework:** React / Vue
**Language:** TypeScript / JavaScript
**Styling:** Tailwind / CSS Modules / styled-components / etc.
### Files Created
- (path) -- component source
- (path) -- test file
- (path) -- story file (if applicable)
- (path) -- style file (if applicable)
### Props: (count)
### Test Cases: (count)
### Accessibility Features:
- (list of a11y features implemented)
### Usage Example
(short code snippet showing how to use the component)
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
sonnet7-day visitors to each command page
/recipe-commands:component-genfrom recipe-commands
npx claudepluginhub sagargupta16/claude-code-recipes --plugin recipe-commands15 commands in this plugin
/api-genStep 1 -- Understand the RequirementsGenerate REST API endpoints with routes, validation, error handling, and tests/audit-reposStep 1 -- List the ReposAudit all your GitHub repos for CI health, hygiene, security alerts, and staleness/check-all-prsStep 1 -- Find the PRsCheck all your open PRs across GitHub repos for CI, reviews, and merge readinessOther plugins' commands for the same job