Layout Files: +layout.svelte
Share navigation and shell UI across multiple pages with layout components.
Layouts Wrap Pages
A +layout.svelte file wraps all pages in the same folder and its subfolders.
Root Layout
src/routes/+layout.svelte wraps every page in the app. Common place for nav and shell.
<!-- +layout.svelte -->
<nav>...</nav>
<main>
<slot />
</main>All lessons in this course
- File-based Routing with +page.svelte
- Dynamic Route Parameters: [id]
- Optional and Rest Parameters
- Layout Files: +layout.svelte