--- title: --- ```svelte ``` ```svelte ``` ```svelte ``` Components can have child content, in the same way that elements can. The content is exposed in the child component using the `` element, which can contain fallback content that is rendered if no children are provided. ```svelte
this fallback content will be rendered when no content is provided, like in the first example

this is some child content that will overwrite the default slot content

``` Note: If you want to render regular `` element, You can use ``. > [!NOTE] > In Svelte 5+, use snippets instead ## `` Named slots allow consumers to target specific areas. They can also have fallback content. ```svelte
No header was provided

Some content between header and footer

Hello

Copyright (c) 2019 Svelte Industries

``` Components can be placed in a named slot using the syntax ``. In order to place content in a slot without using a wrapper element, you can use the special element ``. ```svelte
No header was provided

Some content between header and footer

All rights reserved.

Copyright (c) 2019 Svelte Industries

``` ## `` Slots can be rendered zero or more times and can pass values _back_ to the parent using props. The parent exposes the values to the slot template using the `let:` directive. The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}`, and `` is equivalent to ``. ```svelte
    {#each items as item}
  • {/each}
{thing.text}
``` Named slots can also expose values. The `let:` directive goes on the element with the `slot` attribute. ```svelte
    {#each items as item}
  • {/each}
{item.text}

Copyright (c) 2019 Svelte Industries

```