Skip to content

FiiveAB/vue-toggle-switches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Toggle Switches

A Vue.js component for simple switches with theme support for bulma, bootstrap and custom themes.

This is originally a fork from 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

npm install vue-toggle-switches --save

Basic Usage

import Switches from 'vue-toggle-switches';

new Vue({

    components: {
        Switches
    },

    data () {
        return {
            enabled: false
        }
    }
};
<switches v-model="enabled"></switches>

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.