Introduction to Vue.js

1/1/2025

Introduction to Vue.js

Vue.js is a progressive JavaScript framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable.

What is Vue?

Vue (pronounced /vjuː/, like view) is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative, component-based programming model.

Why Vue?

Vue is designed to be approachable, performant, and versatile:

  • Approachable: Builds on top of standard HTML, CSS and JavaScript with intuitive API and world-class documentation.
  • Performant: Truly reactive, compiler-optimized rendering system that rarely requires manual optimization.
  • Versatile: A rich, incrementally adoptable ecosystem that scales between a library and a full-featured framework.

Getting Started

The easiest way to try out Vue.js is using the online playground. You can also create a new project using the official scaffolding tool:

bash
npm create vue@latest

This command will install and execute create-vue, the official Vue project scaffolding tool.

Your First Vue App

Here’s a simple example:

vue
<script setup>
import { ref } from 'vue'
const message = ref('Hello Vue!')
</script>

<template>
  <h1>{{ message }}</h1>
</template>