0.3.2 • Published 6 years ago

simpel-modal v0.3.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Simpel Modal is very simple Vue.js component for modal windows. Take a look.

To use this component you need to install Vue.js first.

If you use node, you can install simpel-modal component with npm or yarn:

npm i --save simpel-modal

yarn add simpel-modal

As an alternative you can reference the script and the styles in HTML code (the files can be found in /dist/ directory):

<link rel="stylesheet" href="/simpel-modal.css">
<script src="/simpel-modal.js"></script>

Once installed, you can register the component globally:

import SimpelModal from 'simpel-modal';

Vue.component('simpel-modal', SimpelModal)

Then it can be used in a template as:

<simpel-modal ref="greeting-modal">
  Hey!
</simpel-modal>

To control the component call .open() or .close() method through a reference:

methods: {
  openDemo() {
    this.$refs['greeting-modal'].open();
  },
  closeDemo() {
    this.$refs['greeting-modal'].close();
  },
},
NameRequiredTypeDefaultDescription
idfalseString, NumberrandomId of the modal container
yOffsetfalseNumber0Vertical offset of the modal container
fullscreenfalseBooleanfalseEnables fullscreen mode

Supports nested modals

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.0.1

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago