Vue

HTML

<div id="app">
  <h2>Toster</h2>
  <Component :is="currentComponent"></Component>
  <input type="button" @click="showComp1" value="showComp1">
  <input type="button" @click="showComp2" value="showComp2">
</div>

CSS

body {
  background: #20262E;
  padding: 20px;
  font-family: Helvetica;
}

#app {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  transition: all 0.2s;
}

li {
  margin: 8px 0;
}

h2 {
  font-weight: bold;
  margin-bottom: 15px;
}

del {
  color: rgba(0, 0, 0, 0.3);
}

Vue

Vue.component("comp1", {
	template: "<div>Hello from comp1</div>"
});
Vue.component("comp2", {
	template: "<div>Hello from comp2</div>"
});
new Vue({
  el: "#app",
  data: {
     currentComponent: "comp1"
  },
  methods: {
  	showComp1() {
    	this.currentComponent = "comp1";
    },
    showComp2() {
    	this.currentComponent = "comp2";
    }
  }
})