Component composition

Just like elements can have children...

	<p>I'm a child of the div</p>
</div> can components. Before a component can accept children, though, it needs to know where to put them. We do this with the <slot> element. Put this inside Box.svelte:

<div class="box">

You can now put things in the box:

	<p>This is a box. It can contain anything.</p>

loading editor...
loading Svelte compiler...

loading editor...

Compiler options

result = svelte.compile(source, {

loading editor...