The radio component allows the user to select a single option from an available set of options that are listed side by side.

Element
igc-radio
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 radio input control.
label — The radio control label.

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

The disabled state of the component.

disabled: boolean

Defined in src/internals/mixins/forms/types.ts:32

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

Sets the control into invalid state (visual state only).

invalid: boolean

Defined in src/internals/mixins/forms/types.ts:39

The label position of the radio control.

labelPosition: ToggleLabelPosition = 'after'

Defined in src/components/radio/radio.ts:193

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

The name of the control, submitted with the form data.

name: string

Defined in src/internals/mixins/forms/types.ts:45

The tagName read-only property of the Element interface returns the tag name of the element on which it's called.

MDN Reference

tagName: "igc-radio" = 'igc-radio'

Defined in src/components/radio/radio.ts:63

get checked(): any

Defined in src/components/radio/radio.ts:169

The checked state of the control.

set checked(value: boolean): void

Defined in src/components/radio/radio.ts:169

Parameters

  • value: boolean

Returns void

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

get defaultChecked(): any

Defined in src/internals/mixins/forms/types.ts:139

The initial checked state of the component.

set defaultChecked(value: boolean): void

Defined in src/internals/mixins/forms/types.ts:139

Parameters

  • value: boolean

Returns void

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

Defined in src/internals/mixins/forms/types.ts:48

Returns HTMLFormElement | null

When set, makes the component a required field for validation.

get required(): boolean

Defined in src/components/radio/radio.ts:143

Returns boolean

When set, makes the component a required field for validation.

set required(value: boolean): void

Defined in src/components/radio/radio.ts:133

Parameters

  • value: boolean

Returns void

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

A string containing the validation message of this element.

get validationMessage(): string

Defined in src/internals/mixins/forms/types.ts:54

Returns string

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

Returns a ValidityState object for the element.

get validity(): ValidityState

Defined in src/internals/mixins/forms/types.ts:51

Returns ValidityState

get value(): any

Defined in src/components/radio/radio.ts:152

The value of the control.

set value(value: string): void

Defined in src/components/radio/radio.ts:152

Parameters

  • value: string

Returns void

Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )

Returns true when the element is a candidate for constraint validation.

get willValidate(): boolean

Defined in src/internals/mixins/forms/types.ts:59

Returns boolean

Removes focus from the radio control.

blur(): void

Defined in src/components/radio/radio.ts:276

Returns void

Checks for validity of the control and emits the invalid event if it's invalid.

checkValidity(): boolean

Defined in src/components/radio/radio.ts:289

Returns boolean

Simulates a click on the radio control.

click(): void

Defined in src/components/radio/radio.ts:264

Returns void

Sets focus on the radio control.

focus(options: FocusOptions): void

Defined in src/components/radio/radio.ts:270

Parameters

  • options: FocusOptions

Returns void

Checks for validity of the control and shows the browser message if it's invalid.

reportValidity(): boolean

Defined in src/components/radio/radio.ts:298

Returns boolean

Sets a custom validation message for the control. As long as message is not empty, the control is considered invalid.

setCustomValidity(message: string): void

Defined in src/components/radio/radio.ts:310

Parameters

  • message: string

Returns void