vue3 bootstrap5 modal
1.0.0
# vue3-bootstrap-5-modal-component A simple modal component for vue 3 using bootstrap 5
https://florianbgt.github.io/vue3-bootstrap5-modal/
This component require bootstrap 5 and popper to be installed
npm install bootstrap@next
npm install @popperjs/core
You can then include them into your main.js
file:
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap'
You can import it globaly in your main.js
file:
import Modal form 'path to file/Modal.vue'
...
app.component('Modal', Modal);
Or you can import it localy in each component when you need it:
import Modal from 'path to file/Modal.vue'
Once imported, you can use the component as follow:
<Modal v-model="modal" header="Modal">
<p>This modal have to be closed from the parent</p>
<p>This modal will be close from the parent in 5 seconds</p>
</Modal>
The Modal component take 5 props: