Class IgcRadioComponent

igc-radio

  • 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).

igcChange - Emitted when the control's checked state changes.

base - The radio control base wrapper.

control - The radio input control.

label - The radio control label.

Hierarchy

Hierarchy

  • FormRequiredInterface<this> & FormAssociatedCheckboxElementInterface<this> & EventEmitterInterface<
        IgcRadioComponentEventMap,
        this,
    > & LitElement<this>
    • IgcRadioComponent

Properties

disabled: boolean

The disabled state of the component.

false
invalid: boolean

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

false
labelPosition: "after" | "before" = 'after'

The label position of the radio control.

label-position

name: string

The name attribute of the control.

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

Returns the HTML-uppercased qualified name.

MDN Reference

Accessors

  • set defaultChecked(value: boolean): void

    The initial checked state of the component.

    Parameters

    • value: boolean

    Returns void

  • get form(): null | HTMLFormElement

    Returns the HTMLFormElement associated with this element.

    Returns null | HTMLFormElement

  • get required(): boolean

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

    false
    

    Returns boolean

  • set required(value: boolean): void

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

    false
    

    Parameters

    • value: boolean

    Returns void

  • get validationMessage(): string

    A string containing the validation message of this element.

    Returns string

  • get validity(): ValidityState

    Returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.

    Returns ValidityState

  • get willValidate(): boolean

    A boolean value which returns true if the element is a submittable element that is a candidate for constraint validation.

    Returns boolean

Methods

  • Removes focus from the radio control.

    Returns void

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

    Returns boolean

  • Simulates a click on the radio control.

    Returns void

  • Sets focus on the radio control.

    Parameters

    • options: FocusOptions

    Returns void

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

    Returns boolean

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

    Parameters

    • message: string

    Returns void