Get your own Vue server Result Size: 625 x 565
App.vue
CompOne.vue
CompTwo.vue
main.js
 
<template>
  <h1>Dynamic Components</h1>
  <p>Refresh the page and there is a chance the dynamic component will toggle.</p>
  <component :is="Math.random() > 0.5 ? 'comp-one' : 'comp-two'"></component>
</template>

<style>
  #app {
    width: 350px;
    margin: 10px;
  }
  #app > div {
    border: solid black 2px;
    padding: 10px;
    margin-top: 10px;
  }
</style>                  
http://localhost:5173/