|
1 | | -`<mat-slide-toggle>` is an on/off control that can be toggled via clicking or dragging. |
| 1 | +`<mat-slide-toggle>` is an on/off control that can be toggled via clicking. |
2 | 2 |
|
3 | 3 | <!-- example(slide-toggle-overview) --> |
4 | 4 |
|
5 | | -The slide-toggle behaves similarly to a checkbox, though it does not support an `indeterminate` |
| 5 | +The slide-toggle behaves similarly to a checkbox, though it does not support an `indeterminate` |
6 | 6 | state like `<mat-checkbox>`. |
7 | 7 |
|
8 | | -_Note: the sliding behavior for this component requires that HammerJS is loaded on the page._ |
9 | | - |
10 | 8 | ### Slide-toggle label |
11 | | -The slide-toggle label is provided as the content to the `<mat-slide-toggle>` element. |
| 9 | +The slide-toggle label is provided as the content to the `<mat-slide-toggle>` element. |
12 | 10 |
|
13 | | -If you don't want the label to appear next to the slide-toggle, you can use |
14 | | -[`aria-label`](https://www.w3.org/TR/wai-aria/states_and_properties#aria-label) or |
15 | | -[`aria-labelledby`](https://www.w3.org/TR/wai-aria/states_and_properties#aria-labelledby) to |
| 11 | +If you don't want the label to appear next to the slide-toggle, you can use |
| 12 | +[`aria-label`](https://www.w3.org/TR/wai-aria/states_and_properties#aria-label) or |
| 13 | +[`aria-labelledby`](https://www.w3.org/TR/wai-aria/states_and_properties#aria-labelledby) to |
16 | 14 | specify an appropriate label. |
17 | 15 |
|
18 | 16 | ### Use with `@angular/forms` |
19 | | -`<mat-slide-toggle>` is compatible with `@angular/forms` and supports both `FormsModule` |
| 17 | +`<mat-slide-toggle>` is compatible with `@angular/forms` and supports both `FormsModule` |
20 | 18 | and `ReactiveFormsModule`. |
21 | 19 |
|
22 | 20 | ### Theming |
23 | | -The color of a `<mat-slide-toggle>` can be changed by using the `color` property. By default, |
24 | | -slide-toggles use the theme's accent color. This can be changed to `'primary'` or `'warn'`. |
| 21 | +The color of a `<mat-slide-toggle>` can be changed by using the `color` property. By default, |
| 22 | +slide-toggles use the theme's accent color. This can be changed to `'primary'` or `'warn'`. |
25 | 23 |
|
26 | 24 | ### Accessibility |
27 | 25 | The `<mat-slide-toggle>` uses an internal `<input type="checkbox">` to provide an accessible |
|
0 commit comments