Generate Component
Component name: $1
Description: $2
- Detect stack:
cat package.json | grep -E '"react"|"vue"|"svelte"|"next"|"nuxt"'
ls src/components/ 2>/dev/null | head -5
- Read 2 existing components to match:
- File structure and naming
- Import style
- CSS approach (Tailwind, CSS modules, styled-components)
- Export style (default vs named)
- Generate the component:
- TypeScript props interface
- Component with proper typing
- Default prop values where sensible
- Accessibility attributes (aria-*, role, etc.)
- Generate test file matching project test style.
- If Storybook is present (
ls .storybook/), generate a story too.
- Place files in the correct directory following project conventions.
Summary: list all created files.