Slots ermöglichen es einem Parent-Komponenten, Template-Inhalte in eine Child-Komponente zu übergeben — sie sind die Möglichkeit, flexible, wiederverwendbare Wrapper (Cards, Modals, Layouts) zu erstellen, bei denen der Consumer das innere Markup kontrolliert.
Basic slot
<!-- Card.vue -->
<template>
<div class="card">
<slot></slot> <!-- parent's content is injected here -->
</div>
</template>
<!-- parent -->
<Card>
<h2>Title</h2> <!-- this markup fills the slot -->
<p>Any content!</p>
</Card>
