layout.jsA layout is UI that is shared between routes.
app/dashboard/layout.tsx export default function DashboardLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return <section>{children}</section>
}
A root layout is the top-most layout in the root app directory. It is used to define the <html> and <body> tags and other globally shared UI.
app/layout.tsx export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}
Props
children (required)