Gathering detailed insights and metrics for vue-next-modal
Gathering detailed insights and metrics for vue-next-modal
Gathering detailed insights and metrics for vue-next-modal
Gathering detailed insights and metrics for vue-next-modal
bootstrap-vue-next
BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.
vf-modal
   plugin that provide easy use of modal. It is not only component based but also lets using modal either asynchronous or synchronous behavior.
@additionalui/modal
Additional UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
npm install vue-next-modal
Typescript
Module System
Node Version
NPM Version
67.3
Supply Chain
98.6
Quality
75.7
Maintenance
100
Vulnerability
100
License
Vue (54.47%)
JavaScript (45.53%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
21 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jan 05, 2022
Latest Version
1.0.7
Package Id
vue-next-modal@1.0.7
Unpacked Size
8.00 kB
Size
3.16 kB
File Count
6
NPM Version
6.14.14
Node Version
14.17.5
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
A vue-next based modal plugin with modal
component being defined globally.
1$ npm install vue-next-modal 2// or 3$ yarn add vue-next-modal
Since the modal component is created by sass, please make sure you have sass
& sass-loader
installed in your webpack or other bundlers.
This plugin will register a global component named modal
, which would automatically use the plugin features.
Then you can use useModal
globally to import the modal instance.
If you still need to use option API, you can still access modal by this.$modal
.
Fisrt to install in your main.js
1import { createApp } from 'vue'; 2import { createModal } from 'vue-next-modal'; 3import App from './App.vue'; 4import ErrorModal from './components/ErrorModal.vue'; 5 6// create a new modal instance 7const modal = createModal(); 8 9// here we've to wrap all the modals going to be used in the modal. 10// The global `modal` component will use `component` tag inside to change 11// the modal based on your setting. 12const components = { 13 ErrorModal, 14}; 15 16const app = createApp(App) 17 // provide components for plugin 18 .use(modal, { 19 components, 20 }) 21 .mount('#app');
modal
component has an loading
slot, which you can used to customize your loading layout for modal.
1<template> 2 <div class="main"> 3 <router-view /> 4 </div> 5 <modal :loading="loading" :firstup="true"> 6 <template #loading> 7 Loading Modal... 8 </template> 9 </modal> 10</template> 11 12<script> 13import { ref, onMounted } from 'vue'; 14 15export default { 16 name: 'App', 17 setup() { 18 // if there's some api calling when landing on page 19 // default loading state should be set to "true" 20 const loading = ref(true); 21 onMounted(() => { 22 setTimeout(() => { 23 loading.value = false; 24 }, 2000); 25 }); 26 return { loading }; 27 }, 28}; 29</script>
There are only 3 props here.
loading
Boolean
true
firstup
Boolean
true
modalClass
Object
{}
wrapperTransition
String
innerTransition
String
''
1import { useModal } from 'vue-next-modal'; 2 3export default { 4 setup() { 5 const modal = useModal(); 6 // will render & open ErrorModal in modal component 7 modal.update('ErrorModal', { 8 msg: 'Something Error!' 9 }); 10 11 // will close modal after 2 seconds 12 setTimeout(() => { 13 modal.close(); 14 }, 2000); 15 }, 16};
There are 2 methods, 3 properties in modal
object.
currentModal
vue-reactive-object
name
vue-ref
(String
)after calling
close
method, name will becomeundefined
which auto close the modal.
data
vue-ref
(Object
){}
after calling
close
method, data will become{}
.
update
Function
close
Function
Then the grey overlay is clicked, it'll emit an event called close
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/21 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
84 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More