nested layout
A layout inside a subfolder, which wraps only that section and is itself wrapped by the layouts above it.
In more detail
A dashboard can keep its sidebar in app/dashboard/layout.tsx while the root layout supplies the page shell. Moving between dashboard pages leaves both layouts mounted.
Related terms
- layout.tsx — The special file that wraps a segment and all its children in shared UI that stays mounted while you navigate between them.
- root layout — The required top-level layout that wraps every route and must render the html and body tags.
Taught in
- Root & Nested Layouts: State Preservation Semantics — Next.js 15 & Modern App Router Architecture
- Error Boundaries: Nested error.tsx & Reset Logic — Next.js 15 & Modern App Router Architecture