Creating a Vue 3 App in Vue.js

From the Vue.js cheat sheet · Getting Started · verified Jul 2026

Creating a Vue 3 App

Different ways to create Vue 3 applications

javascript
// CDN (Vue 3)
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<div id="app">{{ message }}</div>
<script>
  const { createApp } = Vue;
  createApp({
    data() {
      return { message: 'Hello Vue!' }
    }
  }).mount('#app');
</script>

// Vite (Recommended for Vue 3)
npm create vue@latest my-app
cd my-app
npm install
npm run dev
💡 Vue 3 is the current version, Vue 2 reached EOL in Dec 2023
⚡ Vite is the recommended build tool for Vue 3 projects
📌 Use create-vue for the best Vue 3 setup experience
🔥 CDN version is only for prototyping, not production

Continue with Vue.js

Save the full cheat sheet or work through every related task.

More Vue.js tasks

Back to the full Vue.js cheat sheet