import {MatButtonToggleModule} from '@angular/material/button-toggle';
MatButtonToggleGroup
Exclusive selection button toggle group that behaves like a radio-button group.
Selector: mat-button-toggle-group
Exported as: matButtonToggleGroupName | Description |
---|---|
@Input()
|
The appearance for all the buttons in the group. |
@Input()
|
Whether multiple button toggle group is disabled. |
@Input()
|
Whether multiple button toggles can be selected. |
@Input()
|
|
@Input()
|
Value of the toggle group. |
@Input()
|
Whether the toggle group is vertical. |
@Output()
|
Event emitted when the group's value changes. |
|
Selected button toggles in the group. |
MatButtonToggle
Single button inside of a toggle group.
Selector: mat-button-toggle
Exported as: matButtonToggleName | Description |
---|---|
@Input()
|
The appearance style of the button. |
@Input('aria-label')
|
Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will take precedence so this may be omitted. |
@Input('aria-labelledby')
|
Users can specify the |
@Input()
|
Whether the button is checked. |
@Input()
|
Whether ripples are disabled. |
@Input()
|
Whether the button is disabled. |
@Input()
|
The unique ID for this button toggle. |
@Input()
|
HTML's 'name' attribute used to group radios for unique selection. |
@Input()
|
MatButtonToggleGroup reads this to assign its own value. |
@Output()
|
Event emitted when the group value changes. |
|
Unique ID for the underlying |
|
The parent button toggle group (exclusive selection). Optional. |
focus | |
---|---|
Focuses the button. |
|
Parameters | |
options? FocusOptions
|
|
MatButtonToggleGroupMultiple
MatButtonToggleChange
Change event object emitted by MatButtonToggle.
Name | Description |
---|---|
|
The MatButtonToggle that emits the event. |
|
The value assigned to the MatButtonToggle. |
MatButtonToggleDefaultOptions
Represents the default options for the button toggle that can be configured
using the MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS
injection token.
Name | Description |
---|---|
|
ToggleType
Acceptable types for a button toggle.
type ToggleType = 'checkbox' | 'radio';
MatButtonToggleAppearance
Possible appearance styles for the button toggle.
type MatButtonToggleAppearance = 'legacy' | 'standard';
MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS
Injection token that can be used to configure the default options for all button toggles within an app.
const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS: InjectionToken<MatButtonToggleDefaultOptions>;