import {MatRadioModule} from '@angular/material/radio';
MatRadioGroup
A group of radio buttons. May contain one or more <mat-radio-button>
elements.
Selector: mat-radio-group
Exported as: matRadioGroupName | Description |
---|---|
@Input()
|
Whether the radio group is disabled |
@Input()
|
Whether the labels should appear after or before the radio-buttons. Defaults to 'after' |
@Input()
|
Name of the radio button group. All radio buttons inside this group will use this name. |
@Input()
|
Whether the radio group is required |
@Input()
|
The currently selected radio button. If set to a new radio button, the radio group value will be updated to match the new selected button. |
@Input()
|
Value for the radio-group. Should equal the value of the selected radio button if there is a corresponding radio button with a matching value. If there is not such a corresponding radio button, this value persists to be applied in case a new radio button is added with a matching value. |
@Output()
|
Event emitted when the group value changes.
Change events are only emitted when the value changes due to user interaction with
a radio button (the same behavior as |
MatRadioButton
A Material design radio-button. Typically placed inside of <mat-radio-group>
elements.
Selector: mat-radio-button
Exported as: matRadioButtonName | Description |
---|---|
@Input('aria-describedby')
|
The 'aria-describedby' attribute is read after the element's label and field type. |
@Input('aria-label')
|
Used to set the 'aria-label' attribute on the underlying input element. |
@Input('aria-labelledby')
|
The 'aria-labelledby' attribute takes precedence as the element's text alternative. |
@Input()
|
Whether this radio button is checked. |
@Input()
|
Theme color palette for the component. |
@Input()
|
Whether ripples are disabled. |
@Input()
|
Whether the radio button is disabled. |
@Input()
|
The unique ID for the radio button. |
@Input()
|
Whether the label should appear after or before the radio button. Defaults to 'after' |
@Input()
|
Analog to HTML 'name' attribute used to group radios for unique selection. |
@Input()
|
Whether the radio button is required. |
@Input()
|
The value of this radio button. |
@Output()
|
Event emitted when the checked state of this radio button changes.
Change events are only emitted when the value changes due to user interaction with
the radio button (the same behavior as |
|
ID of the native input element inside |
|
The parent radio group. May or may not be present. |
focus | |
---|---|
Focuses the radio button. |
MatRadioChange
Change event object emitted by MatRadio and MatRadioGroup.
Name | Description |
---|---|
|
The MatRadioButton that emits the change event. |
|
The value of the MatRadioButton. |