vue
Installation
SKILL.md
Vue
For Nuxt apps, use vue-nuxt instead. This directory is kept as reference.
Based on Vue 3.5. Always use Composition API with
<script setup>.
Preferences
- Prefer JavaScript over TypeScript
- Prefer
<script setup>over<script>(omitlang="ts"unless the project already uses TypeScript) - For performance, prefer
shallowRefoverrefif deep reactivity is not needed - Always use Composition API over Options API
- Discourage using Reactive Props Destructure
- Use runtime
defineProps/defineEmits/defineModel(object or array), not type-based macros - Use kebab-case for
.vuefile names and for custom component tags in templates
Component files, imports, and usage
Custom components use kebab-case on disk and in the template. The JavaScript import binding stays PascalCase.