0.6.0 • Published 6 years ago

@websanova/vue-toggle v0.6.0

Weekly downloads
-
License
-
Repository
github
Last release
6 years ago

Vue Toggle

A simple toggle handle for Vue.js.

Install

> sudo npm install @websanova/vue-toggle
Vue.use(require('@websanova/vue-toggle'));

Usage

Usage is pretty straight forward.

NOTE: Colons or dashes can be used for separation. If using dots "." it will act on that entire object subset.

this.$toggle.show('some:toggle');
this.$toggle.hide('some.toggle');
this.$toggle.flip('some.toggle');
this.$toggle.visible('some:toggle');
this.$toggle.get('some:toggle');
this.$toggle.active('some:toggle');

To watch the toggle to trigger some other events it can e pre registered. It will get the component context from where it is called in.

this.$toggle.register('some:toggle', function (state) {
    console.log(state); // true or false value here.
});

To kill all toggles / watches

this.$toggle.unregister('some:toggle');
0.6.0

6 years ago

0.5.0

6 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago