What are layouts in Nuxt?
javascript
// layouts/default.vue
<template>
<div>
<Header />
<slot /> <!-- Page content here -->
<Footer />
</div>
</template>
// layouts/admin.vue
<template>
<div class="admin">
<AdminSidebar />
<slot />
</div>
</template>
// pages/admin/users.vue
<script setup>
definePageMeta({
layout: "admin"
});
</script>Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.