API reference for Angular Material radio

import {MatRadioModule} from '@angular/material/radio';

Selector: mat-radio-button

Exported as: matRadioButton
Properties
Name Description
@Input('aria-describedby')

ariaDescribedby: string

The 'aria-describedby' attribute is read after the element's label and field type.

@Input('aria-label')

ariaLabel: string

Used to set the 'aria-label' attribute on the underlying input element.

@Input('aria-labelledby')

ariaLabelledby: string

The 'aria-labelledby' attribute takes precedence as the element's text alternative.

@Input({ transform: booleanAttribute })

checked: boolean

Whether this radio button is checked.

@Input()

color: ThemePalette

Theme color of the radio button. This API is supported in M2 themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/radio/styling.

For information on applying color variants in M3, see https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants

@Input({ transform: booleanAttribute })

disableRipple: boolean

Whether ripples are disabled inside the radio button

@Input({ transform: booleanAttribute })

disabled: boolean

Whether the radio button is disabled.

@Input({ transform: booleanAttribute })

disabledInteractive: boolean

Whether the radio button should remain interactive when it is disabled.

@Input()

id: string

The unique ID for the radio button.

@Input()

labelPosition: 'before' | 'after'

Whether the label should appear after or before the radio button. Defaults to 'after'

@Input()

name: string

Analog to HTML 'name' attribute used to group radios for unique selection.

@Input({ transform: booleanAttribute })

required: boolean

Whether the radio button is required.

@Input()

value: any

The value of this radio button.

@Output()

change: EventEmitter<MatRadioChange>

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 <input type-"radio">).

inputId: string

ID of the native input element inside <mat-radio-button>

radioGroup: MatRadioGroup

The parent radio group. May or may not be present.

Methods
focus

Focuses the radio button.

Parameters

options?

FocusOptions

origin?

FocusOrigin

A group of radio buttons. May contain one or more <mat-radio-button> elements.

Selector: mat-radio-group

Exported as: matRadioGroup
Properties
Name Description
@Input()

color: ThemePalette

Theme color of the radio buttons in the group. This API is supported in M2 themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/radio/styling.

For information on applying color variants in M3, see https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants

@Input({ transform: booleanAttribute })

disabled: boolean

Whether the radio group is disabled

@Input({ transform: booleanAttribute })

disabledInteractive: boolean

Whether buttons in the group should be interactive while they're disabled.

@Input()

labelPosition: 'before' | 'after'

Whether the labels should appear after or before the radio-buttons. Defaults to 'after'

@Input()

name: string

Name of the radio button group. All radio buttons inside this group will use this name.

@Input({ transform: booleanAttribute })

required: boolean

Whether the radio group is required

@Input()

selected: MatRadioButton

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: any

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()

change: EventEmitter<MatRadioChange>

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 <input type-"radio">).

Change event object emitted by radio button and radio group.

Properties
Name Description

source: MatRadioButton

The radio button that emits the change event.

value: T

The value of the radio button.

Properties
Name Description

color: ThemePalette

Theme color of the radio button. This API is supported in M2 themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/radio/styling.

For information on applying color variants in M3, see https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants

disabledInteractive: boolean

Whether disabled radio buttons should be interactive.

Injection token that can be used to inject instances of MatRadioGroup. It serves as alternative token to the actual MatRadioGroup class which could cause unnecessary retention of the class and its component metadata.

const MAT_RADIO_GROUP: InjectionToken;
const MAT_RADIO_DEFAULT_OPTIONS: InjectionToken;