What are Nuxt.js layouts?

Answer

Layouts in Nuxt.js are reusable page wrappers stored in the layouts/ directory. They wrap page components and provide a consistent shell — like a navbar, sidebar, or footer — across multiple pages. The default layout is layouts/default.vue and is applied automatically to all pages unless overridden. A page can specify a different layout using definePageMeta({ layout: 'blog' }), which then uses layouts/blog.vue. Layouts use the <slot /> tag to render the current page content within the wrapper structure.