0Pricing
Sveltejs Academy · Lesson

Layout Groups with (group)

Group routes under a shared layout without adding a URL segment using parentheses.

Why Layout Groups

Sometimes you want a layout that applies to many routes without adding a URL segment.

Folder Convention

Wrap folder names in parentheses to create a layout group: (marketing).

src/routes/(marketing)/+layout.svelte
src/routes/(marketing)/about/+page.svelte
src/routes/(marketing)/pricing/+page.svelte

All lessons in this course

  1. Layout Groups with (group)
  2. Route-Level Layouts
  3. Breaking Out of a Layout with +page@route
  4. Shared Data Across Layouts
← Back to Sveltejs Academy