scrimba
Preview
Slots & Props Interactive
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Slots & Props Interactive
AboutCommentsNotes
Slots & Props Interactive
Expand for more info
index.html
run
preview
console
<html>
<head>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app" class="bg-blue-200 w-full h-screen ">

<!-- Exercise 1 -->
<!-- A <p> tag with an in-line font size matching the prop -->
<size-title text-size="25">Vue Bootcamp</size-title>

<!-- Exercise 2 -->
<!-- An unordered list of the 3 names and a title -->
<my-list list="{ names: ['John', 'Jane', 'Mary'] }">My List of Names</my-list>

<!-- Exercise 3 -->
<!-- Structure a web site with the given 3 slots -->
<my-site>
<template v-slot:header>
My Website Header Here
</template>
<template v-slot:body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.
</template>
<template v-slot:footer>
&copy; 2020 Copyright
</template>
</my-site>

</div>

<script>
var app = new Vue({
el: '#app',
data: {

}
});
</script>
</body>
</html>
Console
!
"[Vue warn]: Unknown custom element: <size-title> - did you register the component correctly? For recursive components, make sure to provide the "name" option. (found in <Root>)"
,
!
"[Vue warn]: Unknown custom element: <my-list> - did you register the component correctly? For recursive components, make sure to provide the "name" option. (found in <Root>)"
,
!
"[Vue warn]: Unknown custom element: <my-site> - did you register the component correctly? For recursive components, make sure to provide the "name" option. (found in <Root>)"
,
"Download the Vue Devtools extension for a better development experience: https://github.com/vuejs/vue-devtools"
,
"You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html"
,
/index.html
-5:49