- 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.
Constructors
Section titled "Constructors"IgcRadioComponent
new IgcRadioComponent(): IgcRadioComponent Defined in src/components/radio/radio.ts:179
Returns IgcRadioComponent
Properties
Section titled "Properties"disabled
Section titled "disabled"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
The disabled state of the component.
disabled: boolean invalid
Section titled "invalid"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
Sets the control into invalid state (visual state only).
invalid: boolean labelPosition
Section titled "labelPosition"The label position of the radio control.
labelPosition: ToggleLabelPosition = 'after' Defined in src/components/radio/radio.ts:177
Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
The name attribute of the control.
name: string tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: "igc-radio" = 'igc-radio' Defined in src/components/radio/radio.ts:67
Accessors
Section titled "Accessors"checked
Section titled "checked"The checked state of the control.
set checked(value: boolean): void Defined in src/components/radio/radio.ts:160
Parameters
- value:
boolean
Returns void
defaultChecked
Section titled "defaultChecked"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
get defaultChecked(): boolean Defined in src/components/common/mixins/forms/types.ts:169
Returns boolean
The initial checked state of the component.
set defaultChecked(value: boolean): void Defined in src/components/common/mixins/forms/types.ts:168
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/components/common/mixins/forms/types.ts:45
Returns HTMLFormElement | null
required
Section titled "required"When set, makes the component a required field for validation.
get required(): boolean Defined in src/components/radio/radio.ts:134
Returns boolean
When set, makes the component a required field for validation.
set required(value: boolean): void Defined in src/components/radio/radio.ts:124
Parameters
- value:
boolean
Returns void
validationMessage
Section titled "validationMessage"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
A string containing the validation message of this element.
get validationMessage(): string Defined in src/components/common/mixins/forms/types.ts:54
Returns string
validity
Section titled "validity"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
Returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.
get validity(): ValidityState Defined in src/components/common/mixins/forms/types.ts:51
Returns ValidityState
value
Section titled "value"The value attribute of the control.
set value(value: string): void Defined in src/components/radio/radio.ts:143
Parameters
- value:
string
Returns void
willValidate
Section titled "willValidate"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
A boolean value which returns true if the element is a submittable element that is a candidate for constraint validation.
get willValidate(): boolean Defined in src/components/common/mixins/forms/types.ts:60
Returns boolean
Methods
Section titled "Methods"addEventListener
Section titled "addEventListener"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
addEventListener(type: K, listener: object, options: boolean | AddEventListenerOptions): void Defined in src/components/common/mixins/event-emitter.ts:7
Parameters
- type:
K - listener:
object - options:
boolean | AddEventListenerOptions
Returns void
Removes focus from the radio control.
blur(): void Defined in src/components/radio/radio.ts:231
Returns void
checkValidity
Section titled "checkValidity"Checks for validity of the control and emits the invalid event if it invalid.
checkValidity(): boolean Defined in src/components/radio/radio.ts:244
Returns boolean
click
Section titled "click"Simulates a click on the radio control.
click(): void Defined in src/components/radio/radio.ts:219
Returns void
emitEvent
Section titled "emitEvent"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
emitEvent(type: K, eventInitDict: CustomEventInit<D>): boolean Defined in src/components/common/mixins/event-emitter.ts:30
Parameters
- type:
K - eventInitDict:
CustomEventInit<D>
Returns boolean
focus
Section titled "focus"Sets focus on the radio control.
focus(options: FocusOptions): void Defined in src/components/radio/radio.ts:225
Parameters
- options:
FocusOptions
Returns void
removeEventListener
Section titled "removeEventListener"Inherited from: FormAssociatedCheckboxRequiredMixin( EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>( LitElement ) )
removeEventListener(type: K, listener: object, options: boolean | EventListenerOptions): void Defined in src/components/common/mixins/event-emitter.ts:17
Parameters
- type:
K - listener:
object - options:
boolean | EventListenerOptions
Returns void
reportValidity
Section titled "reportValidity"Checks for validity of the control and shows the browser message if it invalid.
reportValidity(): boolean Defined in src/components/radio/radio.ts:253
Returns boolean
setCustomValidity
Section titled "setCustomValidity"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:265
Parameters
- message:
string
Returns void
register
Section titled "register"register(): void Defined in src/components/radio/radio.ts:71
Returns void
Events
Section titled "Events"igcChange
Section titled "igcChange"igcChange: CustomEvent<IgcRadioChangeEventArgs> Defined in src/components/radio/radio.ts:37