2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9 `paper-toggle-button` provides a ON/OFF switch that user can toggle the state
10 by tapping or by dragging the swtich.
14 <paper-toggle-button></paper-toggle-button>
16 Styling toggle button:
18 To change the toggle color:
20 paper-toggle-button::shadow .toggle {
21 background-color: #9c27b0;
24 To change the ink color:
26 paper-toggle-button::shadow .toggle-ink {
30 To change the checked toggle color:
32 paper-toggle-button::shadow [checked] .toggle {
33 background-color: #4285f4;
36 To change the checked ink color:
38 paper-toggle-button::shadow [checked] .toggle-ink {
42 To change the toggle bar and toggle button colors separately:
44 paper-toggle-button::shadow .toggle-bar {
45 background-color: #5677fc;
48 paper-toggle-button::shadow .toggle-button {
49 background-color: #9c27b0;
53 @element paper-toggle-button
55 --><html><head><link rel=
"import" href=
"../paper-radio-button/paper-radio-button.html">
56 <link rel=
"import" href=
"../core-a11y-keys/core-a11y-keys.html">
58 </head><body><polymer-element name=
"paper-toggle-button" attributes=
"checked disabled" role=
"button" aria-pressed=
"false" tabindex=
"0" assetpath=
"">
61 <link rel=
"stylesheet" href=
"paper-toggle-button.css">
63 <core-a11y-keys target=
"{{}}" keys=
"space" on-keys-pressed=
"{{tap}}"></core-a11y-keys>
65 <div id=
"toggleContainer" checked?=
"{{checked}}" disabled?=
"{{disabled}}">
67 <div id=
"toggleBar" class=
"toggle toggle-bar"></div>
69 <div id=
"toggleButton" class=
"toggle toggle-button">
70 <paper-ripple id=
"ink" class=
"toggle-ink circle"></paper-ripple>
78 <script charset=
"utf-8" src=
"paper-toggle-button-extracted.js"></script></body></html>