Layouts in Svelte

From the SvelteKit cheat sheet · Routing · verified Nov 2026

Layouts

Nested layouts and layout groups

javascript
<!-- +layout.svelte -->
<script>
  let { data, children } = $props();
</script>

<nav>
  <a href="/">Home</a>
  <a href="/about">About</a>
</nav>

{@render children()}

<footer>© My App</footer>
🎨 Nested layouts inherit from parent layouts
📦 Layout groups with (folder) for organization
🔄 Layout resets with @ syntax
⚡ Layouts render the page with {@render children()}

Continue with SvelteKit

Save the full cheat sheet or work through every related task.

More Svelte tasks

Back to the full SvelteKit cheat sheet