// you need to pass to the slot, as a prop:
// ChildComponent.vue
<script setup>
const data = `
This is the data
I want to get at it.
`
</script>
<template>
<slot :data="data">
<div>
{{ data }}
</div>
</slot>
</template>
// then, access them like this, in the Parent component:
// ParentComponent.vue
<template>
<ChildComponent>
<template v-slot:default="{ data }"></template>
</ChildComopnent>
</template>