A customizable rocker switch component for Vue.js.
npm install vue-rocker-switch --save
<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>
Event | Description |
---|---|
change | Fires each time the rocker switch changes. |
npm install
npm run serve
npm run build
npm run lint
- Fork it (https://github.com/dannyfeliz/vue-rocker-switch/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details
- This project was inspired by this post from codepen.io Checkbox Toggle Switches Are Confusing UI by @MarcusConnorNH