0.1.1 • Published 6 years ago

vue-switchc v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

vue-switch

a vue switch component

Install

npm install vue-switchc -S

yarn add vue-switchc

Quickstart

require('vue-switchc/dist/vue-switch.css');

// in ES6 modules
import { switchc } from 'vue-switchc';

// in CommonJS
const { switchc } = require('vue-switchc');

// in Global variable
const { switchc } = VueSwitch;

Vue.component('c-switch',switchc);
<c-switch v-model="checked" :text="text"></c-switch>

Props

ParameterTyperequiredDefaultDescription
valuebooleanrequiredfalseswitch checked status, use width v-model
textstringoptionalswitch text on right
widthnumberoptional60switch width
heightnumberoptional30switch height
active-colorstringoptional'#0275d8'switch checked color

Preview

switch image

0.1.1

6 years ago

0.1.0

6 years ago