scrimba
Learn Svelte
Templating
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

AboutCommentsNotes
Templating
Expand for more info
App.svelte
run
preview
console
<script>
import Face from './Face.svelte';
import Container from './Container.svelte';
let say = 'hi';
setTimeout(() => {
say = 'bye';
}, 1000)
</script>

<Container>
<div>
Say: {say}
</div>

<Face index={0} />
<Face />
<Face index={2}/>
</Container>



<style>
div {
color: red;
}
:global(*) {
box-sizing: border-box;
}
:global(body, html) {
margin: 0;
height: 100vh;
overflow: hidden;
}
</style>
Console
/index.html
-2:56