whatisgithub

What is vue-class-component?

vuejs/vue-class-component — explained in plain English

Analysis updated 2026-06-26

5,765TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

Vue Class Component was a library enabling TypeScript class-based syntax for Vue components using decorators. Now deprecated by the Vue team, who recommend the Composition API with script setup instead. Community fork vue-facing-decorator exists for those who still want class-style components.

Mindmap

mindmap
  root((repo))
    Purpose
      Class based components
      Decorator syntax
      TypeScript support
    Deprecation
      No longer maintained
      Vue team abandoned
      Composition API preferred
    Alternatives
      vue-facing-decorator fork
      Composition API
      Script setup syntax
    Migration
      vue-class-migrator tool
      CLI migration helper
    Licensing
      MIT license
      Old docs available
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Writing Vue components using TypeScript classes and decorators instead of the options object style

USE CASE 2

Maintaining legacy Vue projects that were built with class-based component syntax

USE CASE 3

Migrating existing vue-class-component code to modern Vue 3 Composition API using the vue-class-migrator tool

USE CASE 4

Referencing deprecated patterns when evaluating community fork vue-facing-decorator as a replacement

What is it built with?

TypeScriptVue.jsDecorators

How does it compare?

vuejs/vue-class-componentgalacean/enginepiotrwitek/utility-types
Stars5,7655,7685,759
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Project is deprecated. For new projects use Vue 3 Composition API with script setup. For class-style components consider vue-facing-decorator. For migration use vue-class-migrator CLI tool.

MIT licensed. Free to use, modify, and distribute for any purpose including commercial projects.

So what is it?

Vue Class Component was a library that let developers write Vue components using a class-based syntax with decorators, rather than the standard object-based options style that Vue uses by default. Instead of writing a component as a plain JavaScript object with properties like data, methods, and computed, you could define it as a TypeScript class where each method and property had a more familiar object-oriented structure. The library is now deprecated and no longer actively maintained by the Vue team. The README explicitly states that class-based components are no longer the recommended approach for Vue 3. The current recommendation for building Vue 3 applications is to use Single-File Components with the Composition API and the script setup syntax, which offers better TypeScript support and more flexibility without needing class syntax or decorators. For developers who still want to write class-style Vue components, the README points to a community-maintained fork called vue-facing-decorator. For developers who have existing code written with vue-class-component and want to migrate away from it, a separate CLI migration tool called vue-class-migrator is mentioned as a starting point for that transition. The original library is MIT licensed and documentation for earlier versions remains available at class-component.vuejs.org. The README for this repository is intentionally sparse since the project is no longer being developed.

Copy-paste prompts

Prompt 1
I have a Vue component written with vue-class-component decorators. Help me refactor it to use the Vue 3 Composition API with script setup syntax instead.
Prompt 2
I'm maintaining a legacy codebase that uses vue-class-component. What are the key differences between class-based Vue components and the Composition API, and what should I watch out for when migrating?
Prompt 3
Show me a side-by-side comparison of a Vue component written with vue-class-component versus the equivalent written with the Vue 3 Composition API and script setup.
Prompt 4
I want to use class-based syntax in Vue 3 today. Compare vue-class-component (deprecated) with vue-facing-decorator (community fork) and help me decide which to use.
Prompt 5
Help me use vue-class-migrator to start migrating my vue-class-component project. What does the tool handle automatically and what will I need to fix manually?

Frequently asked questions

What is vue-class-component?

Vue Class Component was a library enabling TypeScript class-based syntax for Vue components using decorators. Now deprecated by the Vue team, who recommend the Composition API with script setup instead. Community fork vue-facing-decorator exists for those who still want class-style components.

What language is vue-class-component written in?

Mainly TypeScript. The stack also includes TypeScript, Vue.js, Decorators.

What license does vue-class-component use?

MIT licensed. Free to use, modify, and distribute for any purpose including commercial projects.

How hard is vue-class-component to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is vue-class-component for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.