import {MatSlideToggleModule} from '@angular/material/slide-toggle';
MatSlideToggle
Represents a slidable "switch" toggle that can be moved between on and off.
Selector: mat-slide-toggle
Exported as: matSlideToggleName | Description |
---|---|
@Input('aria-label')
| Whether the slide-toggle element is checked or not Used to set the aria-label attribute on the underlying input element. |
@Input('aria-labelledby')
| Used to set the aria-labelledby attribute on the underlying input element. |
@Input()
| Whether the slide-toggle element is checked or not |
@Input()
| Theme color palette for the component. |
@Input()
| Whether ripples are disabled. |
@Input()
| Whether the component is disabled. |
@Input()
| A unique id for the slide-toggle input. If none is supplied, it will be auto-generated. |
@Input()
| Whether the label should appear after or before the slide-toggle. Defaults to 'after' |
@Input()
| Name value will be applied to the input element if present |
@Input()
| Whether the slide-toggle is required. |
@Output()
| An event will be dispatched each time the slide-toggle changes its value. |
| Returns the unique id for the visual hidden input. |
focus | |
---|---|
Focuses the slide-toggle. |
toggle | |
---|---|
Toggles the checked state of the slide-toggle. |
MatSlideToggleChange
Change event object emitted by a MatSlideToggle.
Name | Description |
---|---|
| The new |
| The source MatSlideToggle of the event. |