Class IgcRadioComponent

igc-radio

  • The radio label.

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

igcFocus - Emitted when the control gains focus.

igcBlur - Emitted when the control loses focus.

base - The radio control base wrapper.

control - The radio control.

label - The radio control label.

Hierarchy

Hierarchy

  • FormRequiredInterface<this> & FormAssociatedElementInterface<this> & EventEmitterInterface<IgcRadioEventMap, this> & LitElement<this>
    • IgcRadioComponent

Other

disabled: boolean

The disabled state of the component

[disabled=false]

invalid: boolean

Control the validity of the control.

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

The label position of the radio control.

label-position

name: string

The name attribute of the control.

required: boolean

Makes the control a required field in a form context.

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

Returns the HTML-uppercased qualified name.

MDN Reference

  • get form(): null | HTMLFormElement
  • Returns the HTMLFormElement associated with this element.

    Returns null | HTMLFormElement

  • 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

  • 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

lifecycle

  • Invoked when the component is added to the document's DOM.

    In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

    connectedCallback() {
    super.connectedCallback();
    addEventListener('keydown', this._handleKeydown);
    }

    Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

    Returns void