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: matButtonToggleGroup| Name | 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: matButtonToggle| Name | 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
|
|
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 |
|---|---|
|
Default appearance to be used by button toggles. Can be overridden by explicitly setting an appearance on a button toggle or group. |
ToggleType
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>;
MAT_BUTTON_TOGGLE_GROUP
Injection token that can be used to reference instances of MatButtonToggleGroup.
It serves as alternative token to the actual MatButtonToggleGroup class which
could cause unnecessary retention of the class and its component metadata.
const MAT_BUTTON_TOGGLE_GROUP: InjectionToken<MatButtonToggleGroup>;