[whatwg] Add <input> "Switch" Type
anewpage.media at gmail.com
Fri Sep 20 15:36:53 PDT 2013
"iPhone OS" introduced the switch control (http://i.imgur.com/TA79fo2.png)
in 2007. Since then, there have been many attempts to recreate this on the
Web Platform by hacking existing control types and using a lot of
meaningless markup, to varying degrees of success.
The proposal is to add a "switch" <input> type. When it is active, the UA
should render a switch control. It looks like this:
<input type="switch" on />
The "on" attribute indicates whether the switch is in its "on" or "off"
state. There is no "off" attribute, as switches are off by default. The
values corresponding to each state are true and false, respectively.
List of OSs that implement switch controls (likely incomplete):
- Windows 8
- OS X
- Blackberry OS
- Windows Phone
The major advantage here, as with all controls in HTML, is that the
behavior and default appearance of the control is guaranteed to be
consistent for a user across the Web, and likely match their host OS as
well. This is sure to be a very attractive and convenient solution for
More information about the whatwg