Lets the user select one option from a set. Radios with the same name form a group, and only one radio of the group is checked.

Slots
default — The radio label.
helper-text — Renders content below the input.
value-missing — Renders content when the required validation fails.
custom-error — Renders content when setCustomValidity(message) is set.
invalid — Renders content when the component is in invalid state (validity.valid = false).
CSS Parts
base — The radio control base wrapper.
control — The circle of the radio.
label — The radio control label.
ripple — The highlight around the circle on hover and focus. A disabled radio hides it.
checked — Added to the base, control, label and ripple parts when the radio is checked.
focused — Added to the base part when the radio has keyboard focus.

Whether the control is checked. A checked radio clears the other radios of its group.

checked: boolean

The label position of the radio control.

labelPosition: ToggleLabelPosition

Whether the group of the radio is required. A required group fails validation while none of its radios is checked.

required: boolean

The value of the control, submitted when the control is checked.

value: string

Removes focus from the radio control.

blur(): void

Returns void

Checks the validity of the whole group. Each invalid radio of the group emits invalid.

checkValidity(): boolean

Returns boolean

Simulates a click on the radio control.

click(): void

Returns void

Sets focus on the radio control.

focus(options: FocusOptions): void

Parameters

  • options: FocusOptions

Returns void

Checks the validity of the group. An invalid radio emits invalid and takes the focus. It shows its own validation messages, not the message of the browser.

reportValidity(): boolean

Returns boolean

Sets a custom validation message on every radio of the group. The radios are invalid while message is not empty.

setCustomValidity(message: string): void

Parameters

  • message: string

Returns void

Emitted when the checked state of the control changes by user interaction.

onChange(args: CustomEvent<IgrRadioChangeEventArgs>): void

Parameters

Returns void