--- name: vue description: "Vue standards: Composition API, Single-File Components, reactivity, props and events, state, testing, and performance. Use when building or reviewing Vue components." metadata: applies-to: "**/*.vue,**/vite.config.*,**/vue.config.js,**/nuxt.config.*" --- # Vue Development Instructions Apply `.plaesy/instructions/ui-ux-design-principles.md` (hierarchy, feedback, affordance, navigation) to every component you build — this file covers framework mechanics, not interaction design. Component-first frontend work: declarative templates plus a reactivity system, per the [Vue introduction](https://vuejs.org/guide/introduction.html) (retrieved 2026-09-27). Vue 2 reached end of life on 2023-12-31, so Vue 2 migration is out of scope for new work unless the project is explicitly a Vue 2 codebase. Source (retrieved 2026-09-27): [Vue Guide — Introduction](https://vuejs.org/guide/introduction.html) for the two core features (declarative rendering, reactivity), Single-File Components, and the Options API / Composition API choice. The guide also notes an LLM-optimised Markdown version of each page at the same path plus `.md`. Vue's official libraries are Vue Router and Pinia; anything else in a Vue project is a third-party dependency and gets the same scrutiny as any other. ## Project Context - Single-File Components (`*.vue`) are the recommended authoring format when a build setup exists: one file holds the template, the logic, and the scoped styles - Two API styles exist and both are fully supported; Vue's own guidance is Options API for progressive enhancement / no build step, and Composition API + SFCs for full applications - TypeScript is a first-class option via the Composition API (Vue maintains a dedicated TS guide and `vue-tsc`); adopt it if the project already does - Build tooling is the project's choice (Vite is the common one); do not migrate a working build to a different tool inside a feature change ## Development Standards ### Choosing an API style - Pick one style per component and per file; do not mix Options API and Composition API inside one component - ` ``` ## References - Introduction — https://vuejs.org/guide/introduction.html - Guide index (Reactivity Fundamentals, Components, Single-File Components, Testing, Performance, Security, TypeScript) — https://vuejs.org/guide/