generate_component
Creates a Vue component in a Nuxt 4 codebase using Composition API. Supports props, emits, and optional Pinia store integration.
Instructions
Generate a Vue component in the target Nuxt 4 codebase. Creates a new component with Composition API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the component (e.g., 'UserCard', 'Button') | |
| relativePath | Yes | Relative path in target (e.g., 'components/UserCard.vue') | |
| module | No | Optional module name to prefix path (e.g., 'deals', 'tickets') | |
| targetPath | No | Optional absolute target path override | |
| props | No | Optional props to include | |
| emits | No | Optional emits to include | |
| hasStore | No | Whether component uses a Pinia store | |
| storeName | No | Name of the store if hasStore is true |