Getting Started
Let's install Light Modal Vue 3 plugin
Install plugin
Install npm package:
npm
npm i light-modal-vue3
Integrate plugin to your project
Import plugin on your main.js file
main.js
import LightModal from 'light-modal-vue3';
const app = createApp(App);
app.use(LightModal);
app.mount('#app');
Add modal on YourComponent.vue
YourComponent.vue
<l-modal :name="'test'" />
Name prop is required to open modal
Open the modal using the open method with its name passed to it
YourComponent.vue
methods: {
yourMethodToOpenModal() {
this.$modals.open("test")
}
}
All modals methods you can read at modal methods page
✨ Great job! You have successfully configured the plugin.
Table of Contents