vuejs-overlay
Vue.js Overlay
is a practical, modern and convenient overlay
(popup
) Vue.js
component.
What?
It is a stylish popup component for Vue.js
that you can easily use in your projects.
The most important features are flexible, modern, animated, stable, lightweight.
Install
npm install vuejs-overlay --save
Usage
My popup Open Popup
// ES6; el: '#app' { return opened: false visible: false } components: Overlay ;
Configurations
You can make the configurations with props
.
Configuration | Type | Default | Description |
---|---|---|---|
animate | String, Boolean | false | You can choose which animation the popup will open and close. |
backdrop | Boolean | true | Specifies whether the popup has a backdrop. |
close-on-escape | Boolean | true | This is to close the popup with the escape key . |
close-on-cancel | Boolean | true | This is to close the popup with the cancel button . |
close-by-backdrop-click | Boolean | true | This is to close the popup when the backdrop is clicked. |
closeable | Boolean | true | Closing feature of the popup. You can use it in critical form operations. |
opened | Boolean | false | Specifies the popup is opened. |
header | String, Boolean | false | Used to determine the header text of the popup. |
visible | Boolean | false | Specifies that internal elements are loaded of the popup. |
animate
options:
Available "bounce"
, "fade"
, "slide-down"
, "slide-left"
, "slide-right"
, "slide-up"
, "zoom-in"
, "zoom-out"
, false
.
👍
Usage asynchronously:
Let's take an example of content data with ajax. In this example we used vuejs-ajax
library.
Open Popup
;;Vue; el: '#app' { return opened: false visible: false text: null } methods: { thisoverlayOpened = true; Vueajax; } { thisopened = false; thisvisible = false; } components: Overlay ;
Events
Configuration | Type | Description |
---|---|---|
@closed | Callback | Triggers when the popup is closed. We recommend that you use this to ensure stable operation of this component when closing the popup. |
@opened | Callback | Triggers when the popup is opened. |
My popup
License
Copyright (c) 2019 Fatih Koca