Skip to content

tudor2004/ios7-switch

 
 

Repository files navigation

ios7-switch

Personally I really don’t like mimicking native UIs, but I find it interesting to see how these tiny interactions work on iOS7 Switch.

So I did a quick research to find out how those tiny bits are moving around :)

Demo

Here’s the major frames of turning on / turning off interaction.

Installation

$ component install mnmly/ios7-switch

Example

var Switch = require('ios7-switch')
  , checkbox = document.querySelector('input')
  , mySwitch = new Switch(checkbox);

// When `mySwitch` is clicked toggle state
mySwitch.el.addEventListener('click', function(e){
  e.preventDefault();
  mySwitch.toggle();
}, false)

License

MIT

About

iOS7 Style Switch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 66.1%
  • JavaScript 18.2%
  • HTML 13.3%
  • Makefile 2.4%