@kouts/vue-modal
vue-modal

A customizable, stackable, and lightweight modal component for Vue.js 3.
:fire: HEADS UP! You're currently looking at vue-modal next branch for Vue.js 3.
If you're looking for a Vue.js 2 compatible version of vue-modal, please check out the master branch.
vue-modal is designed with web applications in mind and tries to stick as much as possible to the accessibility best practices set in the WAI-ARIA Dialog (Modal) section of W3C.
Features at a glance
- Lightweight, minified gzipped version is < 4kb
- Opens and closes with a data variable using
v-modelor with anameprop andshow/hidefunctions - Includes sensible default styling but it's also highly customizable via user CSS classes and styles
- Override modal title and content via slots
- Modal intro and outro effects using CSS animation classes
- Exposes Component events -
before-open,opening,opened,before-close,closing,closed,update:modelValue(close) - Scrollable when its contents exceed screen height
- Closeable by clicking on the upper right "x", the overlay or the
esckey - Stackable - Multiple modal windows on top of each other
- Ability to set initial focus on an element when the modal window opens, just set the autofocus attribute on an element inside the modal
- Focus management traps keyboard focus - tabbed navigation inside the modal window
- Ability to have unclosable modal windows
- Render on demand or stay always in DOM with "live" mode
- Modals appended to
<body>by default, ability to append to a custom element
Browsers support
![]() Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
![]() Opera |
|---|---|---|---|---|
| Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
Click here for documentation and examples https://next--vue-modal-demo.netlify.app/
Development
In order to start development:
pnpm i
pnpm run dev
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 5.0.3 | MIT | |
| 5.0.2 | MIT | |
| 5.0.1 | MIT | |
| 5.0.0 | MIT | |
| 4.1.0 | MIT | |
| 4.0.1 | MIT | |
| 4.0.0 | MIT | |
| 3.0.9 | MIT | |
| 3.0.8 | MIT | |
| 3.0.7 | MIT | |
| 3.0.6 | MIT | |
| 3.0.5 | MIT | |
| 3.0.4 | MIT | |
| 3.0.3 | MIT | |
| 3.0.2 | MIT | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.2.0 | MIT | |
| 2.1.13 | MIT | |
| 2.1.12 | MIT | |
| 2.1.11 | MIT | |
| 2.1.10 | MIT | |
| 2.1.9 | MIT | |
| 2.1.8 | MIT | |
| 2.1.7 | MIT | |
| 2.1.6 | MIT | |
| 2.1.5 | MIT | |
| 2.1.4 | MIT | |
| 2.1.3 | MIT | |
| 2.1.2 | MIT |
Showing the latest 30 of 46. See every release on npm
Pre-releases (1)
| Version | Released | License |
|---|---|---|
| 0.0.0-semantic-release | MIT |




