<div id="app">
  <div class="parent">
    <h2>This is parent component</h2>
    <child>Hello from parent</child>
  </div>
</div>
Vue.component('child', {
  template: '<div class="children">'
            + '<h2>This is children component</h2>'
            + '<slot><slot>'
            + '</div>'
})

new Vue({
  el: '#app'
})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.min.js