1.2.4 • Published 5 years ago

vue-rocker-switch v1.2.4

Weekly downloads
312
License
MIT
Repository
github
Last release
5 years ago

vue-rocker-switch

A customizable rocker switch component for Vue.js.

npm.io

Installation

npm install vue-rocker-switch --save

Demo

Edit vue-rocker-switch demo

Usage example

<template>
  <RockerSwitch />
</template>

<script>
// Import package
import RockerSwitch from "vue-rocker-switch";
// Import styles
import "vue-rocker-switch/dist/vue-rocker-switch.css";

export default {
  name: "App",
  components: {
    RockerSwitch
  }
};
</script>

Props

PropDescriptionDefault valueType
valueBoolean value attached to the rocker switcher. This will be used to initialize the component value too.falseBoolean
sizerocker switch size, it can be a string (small, medium and large) or a decimal numbersmallString or Number
labelOnText of the On labelOnString or Number
labelOffText of the Off labelOffString or Number
activeColorLabelText color used when the On label is active#fff #fffString
inactiveColorLabelText color used when the Off label is inactive#333 #333String
backgroundColorOnBackground color of the On button#0084d0 #0084d0String
backgroundColorOffBackground color of the Off button#bd5757 #bd5757String
borderColorBorder color of the rocker switch#eee #eeeString
toggleAllow to the rocker switch to behave as a toggle switchtrueBoolean

Events

Development setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

Contributing

  1. Fork it (https://github.com/dannyfeliz/vue-rocker-switch/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

0.1.0

5 years ago