Types

Generated LayoutProps type

Next.js generates route-aware helper types for layouts, including named slots and asynchronous params. They become available after route type generation. The type does not validate untrusted data or authorize a request. Example context: isolated Next.js 16.x candidate; snippet is partial unless it defines a complete convention file. Lifecycle: documented. Expected behavior / verification: Generate types in a fixture with this route, then typecheck correct and misspelled param keys. Validate slug separately before data access. Source: https://nextjs.org/docs/app/api-reference/file-conventions/layout Exact installed signature, typecheck and framework execution not run.

Formal Syntax & Structure

nextjs syntaxnextjs
LayoutProps<'/catalog/[slug]'>

Working Example

Example Snippetnextjs
export default async function Layout({children,params}:LayoutProps<'/catalog/[slug]'>){const {slug}=await params;return <section aria-label={`Book ${slug}`}>{children}</section>}
Next.js Reference