From the parent component, you pass some values to the child component, using a colon followed by the name you want to access with in the child component.

On the parent component, say pages/index.vue:

<template>
  <div>
    <div v-for="review in reviews">
      <SingleReview :review="review" :key="review._id" />
    </div>
  </div>
</template>

In this case, we pass each review object to the child with the name review.

On the child component named components/singleReview.vue:

<script setup>
const props = defineProps({
  review: {
    type: Object,
    required: true,
  },
});
const { review } = props;
</script>

And we access each review prop in the child component using the same name.

See a working replication

Answer from learntheropes on Stack Overflow
🌐
Nuxt
nuxt.com › docs › 4.x › api › components › nuxt-page
<NuxtPage> · Nuxt Components v4
For example, in the below example, the value of foobar will be passed to the NuxtPage component and then to the page components. ... <script setup lang="ts"> const props = defineProps<{ foobar: number }>() console.log(props.foobar) // Outputs: 123
Discussions

nuxt.js - How to pass props to component pages - Stack Overflow
Has anyone been able to pass props to pages in Nuxt.js? Typical Vue.js props can be passed as so: parent-component.vue More on stackoverflow.com
🌐 stackoverflow.com
Passing props to page / layout using nuxt-link and props: true
Currently the prop is undefined.. More on github.com
🌐 github.com
6
January 20, 2021
Pass props to nuxt component (or page)
Hi, I can't figure out how to cleanly update my header's title and subtitle, I did it with the store, but that seems overly complicated and doesn't work well with i18n, etc. So I wanted to try two-... More on github.com
🌐 github.com
18
August 28, 2017
nuxt.js -> v-bind to props of <nuxt>
I have made a nuxt.js project. I'm trying to pass data to a component (nuxt). In my first vue file I have this code In a vue file which is put in th... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Nuxt
nuxt.com › docs › 4.x › api › components › nuxt-layout
<NuxtLayout> · Nuxt Components v4
Read more about passing props to layouts. <NuxtLayout /> renders incoming content via <slot />, which is then wrapped around Vue’s <Transition /> component to activate layout transition.
🌐
Nuxtjs
vue-meta.nuxtjs.org › faq › component-props.html
How to use component props or data | Vue Meta
<template> <div> <h1>{{ title }}</h1> </div> </template> <script> export default { name: 'post', props: ['title'], data () { return { description: 'A blog post about some stuff' } }, metaInfo () { return { title: this.title, meta: [ { vmid: 'description', name: 'description', content: this.description } ] } } } </script>
🌐
GitHub
github.com › tailwindlabs › tailwindcss › discussions › 11349
Use props to pass parameters in the nuxt framework for problems encountered in bg-[] · tailwindlabs/tailwindcss · Discussion #11349
After the parent component passes the image url to the props props, setting the background image using the bg-[] custom method does not take effect after rendering. My personal guess is that the bo...
Author   tailwindlabs
🌐
Nuxt TypeScript
typescript.nuxtjs.org › cookbook › components
Components - Nuxt TypeScript
nuxt.config.js · export default { plugins: ['@/plugins/composition-api'] } This plugin registration is mandatory to make setup function works in components. import { defineComponent, computed, ref } from '@vue/composition-api' interface User { firstName: string lastName: string } export default defineComponent({ props: { user: { type: Object as () => User, required: true } }, setup ({ user }) { const fullName = computed(() => `${user.firstName} ${user.lastName}`) const message = ref('This is a message') return { fullName, message } } }) Using vue-class-component through vue-property-decorator ·
Find elsewhere
🌐
Nuxt UI
ui.nuxt.com › docs › getting-started › theme › components
Customize components - Nuxt UI
The class prop allows you to override the classes of the root or base slot. This takes priority over both global config and resolved variants. ... In this example, the font-bold class will override the default font-medium class on this button.
🌐
GitHub
github.com › nuxt › nuxt › issues › 8669
Passing props to page / layout using nuxt-link and props: true · Issue #8669 · nuxt/nuxt
January 20, 2021 - #Boolean mode When props is set to true, the route.params will be set as the component props. <nuxt-link target="_blank" :to="websitePreviewUrl" :company="company">{{ text }}</nuxt-link> // routes.js { name: PATH_KEYS.WEBSITE_PREVIEW, component: () => import('@/pages/website-preview').then((m) => m.default || m), meta: { pageType: PAGE_TYPES.WEBSITE_PREVIEW }, props: true, }, // in the layout / page props: { company: { type: Object, required: true, default: () => {}, }, }, Currently the prop is undefined..
Author   gplusdotgr
🌐
Vue.js
vuejs.org › guide › components › props
Props Declaration
Notice the argument passed to defineProps() is the same as the value provided to the props options: the same props options API is shared between the two declaration styles.
🌐
JetBrains
youtrack.jetbrains.com › issue › WEB-56271 › Nuxt.js-3-props-of-component-defined-with-defineNuxtComponent-not-resolved
Nuxt.js 3: props of component defined with ...
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
DEV Community
dev.to › itsmnthn › watch-props-in-vuenuxt-composition-api-39hg
Watch Props in Vue/Nuxt Composition API - DEV Community
May 15, 2022 - <script lang="ts" setup> import { defineProps, watch } from 'vue' const prop = defineProps({ value: { default: '', type: [String, Number] }, }) watch( () => prop.value, () => { console.log('prop value changed', prop.value) } ) </script> <template> <div>{{ value }}</div> </template>
🌐
GitHub
github.com › nuxt-community › nuxt-property-decorator
GitHub - nuxt-community/nuxt-property-decorator: Property decorators for Nuxt (base on vue-property-decorator) · GitHub
const s = Symbol("baz") export const MyComponent = Vue.extend({ name: "MyComponent", components: { comp }, inject: { foo: "foo", bar: "bar", [s]: s, }, model: { prop: "checked", event: "change", }, props: { checked: Boolean, propA: Number, propB: { type: String, default: "default value", }, propC: [String, Boolean], propD: { type: null }, }, data() { return { foo: "foo", baz: "bar", } }, provide() { return { foo: this.foo, bar: this.baz, } }, methods: { onChildChanged(val, oldVal) {}, onPersonChanged(val, oldVal) {}, }, beforeRouteLeave(to, from, next) { // called when the route that renders this component is about to // be navigated away from.
Starred by 397 users
Forked by 33 users
Languages   JavaScript 57.9% | TypeScript 42.1%
🌐
GitHub
github.com › nuxt › nuxt › issues › 1502
Pass props to nuxt component (or page) · Issue #1502 · nuxt/nuxt
August 28, 2017 - I can't figure out how to cleanly update my header's title and subtitle, I did it with the store, but that seems overly complicated and doesn't work well with i18n, etc. So I wanted to try two-way binding, but it seems that you can't pass props from the layout. Is it impossible or am I missing something? This question is available on Nuxt.js community (#c1337) Reactions are currently unavailable ·
Author   leon-wbr
🌐
Nuxt
nuxt.com › docs › 4.x › directory-structure › app › components
components · Nuxt Directory Structure v4
Server-only components use <NuxtIsland> under the hood, meaning that lazy prop and #fallback slot are both passed down to it.
🌐
Nuxt 2
v2.nuxt.com › docs › features › nuxt-components
Nuxt 2 - Built-in Components
However sometimes you may want ... scripts that need to be loaded. To disable the prefetching on a specific link, you can use the no-prefetch prop. Since Nuxt v2.10.0, you can also use the prefetch prop set to false...
🌐
Mastering Nuxt
masteringnuxt.com › blog › mastering-prose-components-in-nuxt-content
Mastering Prose Components in Nuxt Content
Here, we're displaying a favicon immediately after the link using NuxtImg again. This is so that we can have our own local cache of the favicons using IPX. If the favicon cannot be found or loaded for some reason, we fall back to a basic arrow to indicate that this is an external link. ... Here's the script for this component. I won't go into too much detail for this part: // Get our basic ProseA props const props = defineProps({ href: { type: String, default: '', }, target: { type: String, default: undefined, required: false, }, }); const isInternal = computed(() => { return props?.href?.star
🌐
Stack Overflow
stackoverflow.com › questions › 43101207 › nuxt-js-v-bind-to-props-of-nuxt
nuxt.js -> v-bind to props of <nuxt>
This is also related to my question. Basically Nuxt.js doesn't pass custom props on the <nuxt /> tag.
🌐
tutorialpedia
tutorialpedia.org › blog › how-to-pass-props-to-nuxt-component-pages
How to Pass Props to ` ` Component Pages in Nuxt.js: A Complete Guide — tutorialpedia.org
At the heart of Nuxt’s page rendering lies the <nuxt /> component—a special component used in layouts to dynamically render the current page component based on the route. Whether you’re building a blog, e-commerce site, or dashboard, passing ...
🌐
Nuxt
nuxt.com › blog › v4-4
Nuxt 4.4 · Nuxt Blog
2 weeks ago - This is the first major vue-router upgrade since Nuxt 3, and it comes with a bunch of improvements under the hood. For most apps, this should be a transparent upgrade. If you're using unplugin-vue-router directly, you can remove it from your dependencies. The next step will be taking typed routes out of experimental status. 👀 · You can now pass props to your layouts directly from definePageMeta (#34262).