Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fiiveab/vue-toggle-switches

A toggle switch component for Vue.js
https://github.com/fiiveab/vue-toggle-switches

toggle-buttons toggle-switches vuejs vuejs2

Last synced: 7 days ago
JSON representation

A toggle switch component for Vue.js

Awesome Lists containing this project

README

        

# Vue Toggle Switches

A Vue.js component for simple switches with theme support for [bulma](http://bulma.io), [bootstrap](http://getbootstrap.com/) and custom themes.

This is originally a fork from [vue-switches](https://www.npmjs.com/package/vue-switches), which is no longer maintained.

In this fork, We've added webpack to build the component. This allows us to offer better compatibility across different environments, optimized code performance, and more granular control over the build process.

## Installation

```bash
npm install vue-toggle-switches --save
```

## Basic Usage

```javascript
import Switches from 'vue-toggle-switches';

new Vue({

components: {
Switches
},

data () {
return {
enabled: false
}
}
};
```

```html

```

## Props



Prop
Description




label
A static label to always display whether on or off.


text-enabled
The text that displays when enabled.


text-disabled
The text that displays when disabled.


theme
Which theme to use.


color
Which color to use.


type-bold
Bigger style.


emit-on-mount
By default, a "changed" event is emitted when the component mounts. To disable this, set this to false.

## Acknowledgements

A huge shoutout to the original vue-switches project. We've forked it and made some changes to suit our needs.

## License

**MIT**

We hope the Vue community finds vue-toggle-switches beneficial. Your feedback and contributions are always welcome!

A project by [Fiive](https://www.fiive.se).