Learn Vue by clicking your own page
The Learn view puts the page above its code. Click anything and a tutor tells you what it is and how the Vue in it works, with links to the Vue guide. Made for beginners, classes and anyone curious about the code behind a site.
Hello, Adah1
● We are open
See the menu1<template> 2 <h1>Hello, {{ name }}</h1> 3 <p v-if="open">We are open</p> 4 <Button :href="menu">See the menu</Button> 5</template>
The page and its code
Two views of the same thing
The page is on top and its code is right under it. Type over a heading on the page and the code changes; change the code and the page follows. There is no copy to keep in step: they are the same file.
On a phone the code is left out to give the page room, and the tutor still explains what you tap.
<template> <h1>Hello {{ name }}</h1> <p v-if="open">We are open</p> <Button :href="link">Go</Button> </template> <script> export default { data: () => ({ name: 'Ada', open: true, link: '/menu' }) } </script>
This element Vue Play component
<Button :href="link">
:hrefThe colon makes the value JavaScript: here the value named link in the script.<Button>A component: a part of the page made in a file of its own.
Read more in the Vue guide · ✦ Ask the tutor
The tutor
Click to understand
Select any element and the Learn section says what it is for, shows its tag as it is written, and explains each piece of Vue in it in plain words.
{{ }}v-ifv-for@click:propclassEach explanation links to the right page of the official Vue guide, for when you want to read more. An element with no Vue in it is called plain HTML, with a word on what Vue would look like.
Try it · the syllabus
Nine tasks, nine ideas of Vue
One step at a time, from words on a page to a component of your own. Each task has a hint and a bit of example code. When your page shows it done, it ticks itself and the next one opens. Only what you add counts, and your progress is kept for each project on your device.
data() Values in the script show on the page, and change it when they change.Reactivity ↗v-if An element is there only while a value is true.Conditional rendering ↗Ask the tutor
Stuck? Ask, right beside your code
Ask the tutor writes a question about the element you picked, or the task you are on, into the AI chat. You read it, change it if you like, and send it. The chat is free for everyone who is signed in.
v-for="fruit in fruits". Vue makes one of it for each item…A first lesson
From nothing to v-for in one class
- Open the Studio in a browser and sign in. There is nothing to install.
- Make a site from a template, the Blog or the Restaurant for example. It is a real Vue project, made for the student.
- Pick the Learn view. The page is on top, its code under it.
- Click around. The tutor says what each part is, and links to the guide.
- Do the first tasks: change the words, add a Button, give an element a class, then show a value from the script.
- Ask the tutor where it gets hard, about the element or the task.
For teachers
What a class gets
Questions learners ask
More features
Learn Vue on a page of your own
Open the Studio, pick a template and click anything on it. The tutor is already waiting beside the code.
