JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.6/vue.js"></script>
<script src="https://rawgit.com/cristijora/vue-tabs/master/dist/vue-tabs.js"></script>
<link rel="stylesheet" href="https://rawgit.com/cristijora/vue-tabs/master/themes/material.css">
<link rel="stylesheet" href="https://rawgit.com/lykmapipo/themify-icons/master/css/themify-icons.css">
<div id="app">
<button @click="addTab">Add new tab</button>
<vue-tabs type="pills">
<v-tab v-for="tab in tabs" :key="tab">
<div slot="title">{{tab}} <span @click.stop="removeTab(index)" class="ti-close tab-close"></span></div>
{{tab}}
</v-tab>
</vue-tabs>
</div>
CSS
.tab-close{
float:right;
}
.tab-close:hover{
transform: rotate(7deg);
}
JavaScript
Vue.use(VueTabs);
new Vue({
el:"#app",
data:{
tabs: ['First tab', 'Second tab', 'Third tab']
},
methods: {
removeTab(index){
this.tabs.splice(index, 1)
},
addTab(){
this.tabs.push('New Tab')
}
}
})