Import
Basic Usage
API Reference
MatButtonToggleGroup
Selector:mat-button-toggle-group
Exported as: matButtonToggleGroup
Properties
| Name | Type | Description |
|---|---|---|
@Input() appearance | MatButtonToggleAppearance | Appearance style. Options: ‘legacy’, ‘standard’ |
@Input() name | string | Name attribute for underlying input elements |
@Input() vertical | boolean | Whether the toggle group is vertical |
@Input() value | any | Value of the toggle group |
@Input() multiple | boolean | Whether multiple toggles can be selected |
@Input() disabled | boolean | Whether the group is disabled |
@Input() disabledInteractive | boolean | Whether buttons remain interactive when disabled |
@Input() hideSingleSelectionIndicator | boolean | Hide checkmark for single-selection |
@Input() hideMultipleSelectionIndicator | boolean | Hide checkmark for multiple-selection |
@Output() change | EventEmitter<MatButtonToggleChange> | Event emitted when value changes |
@Output() valueChange | EventEmitter<any> | Event for two-way data binding |
Properties (read-only)
| Name | Type | Description |
|---|---|---|
selected | MatButtonToggle | MatButtonToggle[] | Selected toggle(s) |
MatButtonToggle
Selector:mat-button-toggle
Exported as: matButtonToggle
Properties
| Name | Type | Description |
|---|---|---|
@Input() id | string | Unique ID for the toggle |
@Input() name | string | Name attribute |
@Input() value | any | Value assigned to the toggle |
@Input() tabIndex | number | Tab index |
@Input() disableRipple | boolean | Whether ripples are disabled |
@Input() appearance | MatButtonToggleAppearance | Appearance style |
@Input() checked | boolean | Whether the toggle is checked |
@Input() disabled | boolean | Whether the toggle is disabled |
@Input() disabledInteractive | boolean | Whether toggle remains interactive when disabled |
@Output() change | EventEmitter<MatButtonToggleChange> | Event emitted when checked state changes |
Methods
| Name | Description |
|---|---|
focus(options?: FocusOptions): void | Focuses the button toggle |
Examples
Multiple Selection
With ngModel
Vertical Orientation
With Icons
Accessibility
- Single-selection groups use
role="radiogroup" - Multiple-selection groups use
role="group" - Keyboard navigation with arrow keys (single-selection mode)
- Space/Enter to toggle selection