perterest / vodal

A vue modal with animations.

Home Page:https://chenjiahan.github.io/vodal/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vodal Dependency Status NPM downloads

A vue modal with animations. Example

Installation

npm i -S vodal

Usage

<vodal :show="show" animation="rotate" @hide="show = false">
    <div>A vue modal with animations.</div>
</vodal>
import Vue from 'vue';
import Vodal from 'vodal';

Vue.component(Vodal.name, Vodal);

export default {
    name: 'app',
    
    data() {
        return {
            show: false
        }
    }
}
// include animation styles
@import "vodal/common.css";
@import "vodal/rotate.css";

Props

Property Type Default Description
width number 400 width of dialog
height number 240 height of dialog
measure string px measure of width and height
show bool false whether to show dialog
mask bool true whether to show mask
closeButton bool true whether to show close button
animation string zoom animation type
duration number 300 animation duration
className string / className for the container

Animation Types

  • zoom
  • fade
  • flip
  • door
  • rotate
  • slideUp
  • slideDown
  • slideLeft
  • slideRight

Other

React version

About

A vue modal with animations.

https://chenjiahan.github.io/vodal/

License:MIT License


Languages

Language:CSS 48.4%Language:Vue 27.4%Language:HTML 14.4%Language:JavaScript 9.6%Language:Shell 0.3%