"Vue modal"
Bootstrap 3.3.0 Snippet by irinashuvalova

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div id="root" class="container"> <modal v-if="showModal" @close="showModal = false"> <p>Insert any text</p> </modal> <button @click="showModal = true">Show Modal</button> </div> <script src="https://unpkg.com/vue/dist/vue.js"></script>
Vue.component('modal', { template: ` <div class="modal is-active"> <div class="modal-background"></div> <div class="modal-content"> <div class="box"> <slot></slot> </div> </div> <button class="modal-close" @click="$emit('close')"></button> </div> ` }) new Vue({ el: "#root", data: { showModal: false } })

Related: See More


Questions / Comments: