NuxtN
Nuxt3w ago
Dante

Pass Props from layout to page?

is it possible to pass props from a layout to a page it wraps?

my layout:
// src/layouts/legal.vue
<script setup>
const props = defineProps({
  title: String,
  lastUpdated: String,
});
</script>

<template>
<p>{{props.title}}</p>
<slot/>
<template/>


the page

<script setup>
definePageMeta({
  layout: "legal",
 
});

<template>
...
</template>
`
Was this page helpful?