Get your own Vue server Result Size: 625 x 565
App.vue
SlotComp.vue
main.js
 
<template>
  <h1>App.vue</h1>
  <p>The component has two slots, and the template element is used to assign content to both.</p>
  <slot-comp>
    <template v-slot:topSlot>
      <div>
        <p>Tigers are beautiful!</p>
        <img src="/tiger.svg" alt="tiger" width="100">
      </div>
    </template>
    <template v-slot:bottomSlot>
      <div>
        <p>Whales can be very big</p>
      </div>
    </template>
  </slot-comp>
</template>

<style>
  #app {
    width: 300px;
  }
  #app > div {
  width: 80%;
  border: dotted black 1px;
  margin: 10px;
  padding: 10px;
  background-color: lightgreen;
}
</style>                  
http://localhost:5173/