CSS based iOS 7 style toggle switch
Provides an AngularJS directive and Compass mixin for simple integration
Installation
- Open your bower.json
- Add
"ios-toggle": "latest"to your dependency list - Run
bower install - In your application you can now add:
<script src="bower_components/ios-toggle/ios-toggle.js"></script>
Usage
- In your SCSS
@import "../bower_components/ios-toggle/ios-toggle"; - Use the
@include ios-toggle()mixin to define your styles.- See
ios-toggle.scssfor customisation options
- See
- Create your progress element:
<toggle bind="state"></toggle>Where $scope.state will represent if the switch / toggle is active or inactive.