[RESOLVED] Component children

I'm new to Vue/Nuxt.js and coming from React.

I'm trying to define children in a component so I can do things like this, but is this a thing:
// alert.js

<template>
    <div class="bg-red-200 text-red-600 p-2 rounded">
        {{ children }}
    </div>
</template>

<script setup>
    const props = defineProps(['children'])
</script>


// login.vue

<template>
    <alert>
        <p class="font-bold">
            Example
        </div>
    </alert>
</template>
Was this page helpful?