Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Vue.js Components Fundamentals

Reusable Components with Props

In this lesson, we'll see a realistic use case for reusable components and learn about Vue.js component props.

Props are custom HTML attributes that we can register on our components, which allow us to pass data to our components.

You can find the starting point of the demo in this lesson in the link. We've also created a jsfiddle if you want to play around with the code.

Important Note

Since Vue.js 3 became the default you must now specify version 2 when getting Vue from a CDN.

<script src="https://unpkg.com/vue@2"></script>