New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-libs-simple-toggle

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-libs-simple-toggle

Simple and very light vue.js (v2) toggle component

1.0.6
latest
Source
npm
Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

Vue Simple Toggle (Switch)

A simple and super light Vue.js component for simple toggle button (switch) with a nice smooth transition.

No dependencies. No sass/less compilation. Very easy to use :).


How it looks DEMO

Installation

npm install vue-libs-simple-toggle --save

Basic Usage

import Toggle from 'vue-libs-simple-toggle';

new Vue({

    components: {
        Toggle
    },

    data () {
        return {
            currentState: true
        }
    }
};

<toggle v-model="currentState"></toggle>

Customization

Override the relevant classes to customize it. For example, to make it blue instead of green:

    .vue-libs-simple-toggle input:checked + .slider {
        background-color: blue!important;
    }
    .vue-libs-simple-toggle input:focus + .slider {
        box-shadow: 0 0 1px blue!important;
    }

Keywords

vue

FAQs

Package last updated on 18 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts