Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/fiiveab/vue-toggle-switches
- Owner: FiiveAB
- License: mit
- Created: 2023-10-04T08:13:00.000Z (almost 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-17T16:40:35.000Z (11 months ago)
- Last Synced: 2024-09-26T19:03:00.298Z (7 days ago)
- Topics: toggle-buttons, toggle-switches, vuejs, vuejs2
- Language: Vue
- Homepage:
- Size: 188 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).