OLD | NEW |
1 | 1 |
2 <!--- | 2 <!--- |
3 | 3 |
4 This README is automatically generated from the comments in these files: | 4 This README is automatically generated from the comments in these files: |
5 paper-toggle-button.html | 5 paper-toggle-button.html |
6 | 6 |
7 Edit those files, and our readme bot will duplicate them over here! | 7 Edit those files, and our readme bot will duplicate them over here! |
8 Edit this file, and the bot will squash your changes :) | 8 Edit this file, and the bot will squash your changes :) |
9 | 9 |
| 10 The bot does some handling of markdown. Please file a bug if it does the wrong |
| 11 thing! https://github.com/PolymerLabs/tedium/issues |
| 12 |
10 --> | 13 --> |
11 | 14 |
12 [](https://travis-ci.org/PolymerElements/paper-toggle-button) | 15 [](https://travis-ci.org/PolymerElements/paper-toggle-button) |
13 | 16 |
14 _[Demo and API Docs](https://elements.polymer-project.org/elements/paper-toggle-
button)_ | 17 _[Demo and API docs](https://elements.polymer-project.org/elements/paper-toggle-
button)_ |
15 | 18 |
16 | 19 |
17 ##<paper-toggle-button> | 20 ##<paper-toggle-button> |
18 | 21 |
19 | |
20 Material design: [Switch](https://www.google.com/design/spec/components/selectio
n-controls.html#selection-controls-switch) | 22 Material design: [Switch](https://www.google.com/design/spec/components/selectio
n-controls.html#selection-controls-switch) |
21 | 23 |
22 `paper-toggle-button` provides a ON/OFF switch that user can toggle the state | 24 `paper-toggle-button` provides a ON/OFF switch that user can toggle the state |
23 by tapping or by dragging the switch. | 25 by tapping or by dragging the switch. |
24 | 26 |
25 Example: | 27 Example: |
26 | 28 |
27 <paper-toggle-button></paper-toggle-button> | 29 ```html |
| 30 <paper-toggle-button></paper-toggle-button> |
| 31 ``` |
28 | 32 |
29 ### Styling | 33 ### Styling |
30 | 34 |
31 The following custom properties and mixins are available for styling: | 35 The following custom properties and mixins are available for styling: |
32 | 36 |
33 Custom property | Description | Default | 37 | Custom property | Description | Default | |
34 ----------------|-------------|---------- | 38 | --- | --- | --- | |
35 `--paper-toggle-button-unchecked-bar-color` | Slider color when the input is not
checked | `#000000` | 39 | `--paper-toggle-button-unchecked-bar-color` | Slider color when the input is n
ot checked | `#000000` | |
36 `--paper-toggle-button-unchecked-button-color` | Button color when the input is
not checked | `--paper-grey-50` | 40 | `--paper-toggle-button-unchecked-button-color` | Button color when the input i
s not checked | `--paper-grey-50` | |
37 `--paper-toggle-button-unchecked-ink-color` | Selected/focus ripple color when t
he input is not checked | `--dark-primary-color` | 41 | `--paper-toggle-button-unchecked-ink-color` | Selected/focus ripple color when
the input is not checked | `--dark-primary-color` | |
38 `--paper-toggle-button-checked-bar-color` | Slider button color when the input i
s checked | `--default-primary-color` | 42 | `--paper-toggle-button-checked-bar-color` | Slider button color when the input
is checked | `--primary-color` | |
39 `--paper-toggle-button-checked-button-color` | Button color when the input is ch
ecked | `--default-primary-color` | 43 | `--paper-toggle-button-checked-button-color` | Button color when the input is
checked | `--primary-color` | |
40 `--paper-toggle-button-checked-ink-color` | Selected/focus ripple color when the
input is checked | `--default-primary-color` | 44 | `--paper-toggle-button-checked-ink-color` | Selected/focus ripple color when t
he input is checked | `--primary-color` | |
41 `--paper-toggle-button-unchecked-bar` | Mixin applied to the slider when the inp
ut is not checked | `{}` | 45 | `--paper-toggle-button-unchecked-bar` | Mixin applied to the slider when the i
nput is not checked | `{}` | |
42 `--paper-toggle-button-unchecked-button` | Mixin applied to the slider button wh
en the input is not checked | `{}` | 46 | `--paper-toggle-button-unchecked-button` | Mixin applied to the slider button
when the input is not checked | `{}` | |
43 `--paper-toggle-button-checked-bar` | Mixin applied to the slider when the input
is checked | `{}` | 47 | `--paper-toggle-button-checked-bar` | Mixin applied to the slider when the inp
ut is checked | `{}` | |
44 `--paper-toggle-button-checked-button` | Mixin applied to the slider button when
the input is checked | `{}` | 48 | `--paper-toggle-button-checked-button` | Mixin applied to the slider button wh
en the input is checked | `{}` | |
45 `--paper-toggle-button-label-color` | Label color | `--primary-text-color` | 49 | `--paper-toggle-button-label-color` | Label color | `--primary-text-color` | |
46 `--paper-toggle-button-label-spacing` | Spacing between the label and the button
| `8px` | 50 | `--paper-toggle-button-label-spacing` | Spacing between the label and the butt
on | `8px` | |
| 51 |
| 52 This element applies the mixin `--paper-font-common-base` but does not import `p
aper-styles/typography.html`. |
| 53 In order to apply the `Roboto` font to this element, make sure you've imported `
paper-styles/typography.html`. |
47 | 54 |
48 | 55 |
OLD | NEW |