Slots and provide / inject

Slots let a parent insert content into a child component, via <slot>, optionally with named slots. provide and inject pass data to all descendants without going through every level of props, useful for shared contexts.

Example

<Carte>
  <template #titre>My title</template>
</Carte>

Related concepts

The whole glossary