Class IgcInputComponent

Element

igc-input

Slot

prefix - Renders content before the input.

Slot

suffix - Renders content after input.

Slot

helper-text - Renders content below the input.

Fires

igcInput - Emitted when the control input receives user input.

Fires

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

Fires

igcFocus - Emitted when the control gains focus.

Fires

igcBlur - Emitted when the control loses focus.

Csspart

container - The main wrapper that holds all main input elements.

Csspart

input - The native input element.

Csspart

label - The native label element.

Csspart

prefix - The prefix wrapper.

Csspart

suffix - The suffix wrapper.

Csspart

helper-text - The helper text wrapper.

Hierarchy

  • IgcInputBaseComponent
    • IgcInputComponent

Constructors

Properties

autocomplete: string

The autocomplete attribute of the control.

Attr

autofocus: boolean

The autofocus attribute of the control.

Attr

dir: Direction = 'auto'

The direction attribute of the control.

Attr

disabled: boolean = false

Makes the control a disabled field.

Attr

inputmode: "search" | "numeric" | "none" | "url" | "decimal" | "email" | "tel" | "txt"

The input mode attribute of the control.

Attr

invalid: boolean = false

Controls the validity of the control.

Attr

label: string

The label for the control.

Attr

max: string | number

The max attribute of the control.

Attr

maxlength: number

The maxlength attribute of the control.

Attr

min: string | number

The min attribute of the control.

Attr

minlength: number

The minlength attribute of the control.

Attr

name: string

The name attribute of the control.

Attr

outlined: boolean = false

Whether the control will have outlined appearance.

Attr

pattern: string

The pattern attribute of the control.

Attr

placeholder: string

The placeholder attribute of the control.

Attr

readonly: boolean = false

Makes the control a readonly field.

Attr

required: boolean = false

Makes the control a required field.

Attr

size: "small" | "medium" | "large"

Determines the size of the component.

step: number

The step attribute of the control.

Attr

tabIndex: number = 0
type: "number" | "search" | "url" | "text" | "email" | "password" | "tel" = 'text'

The type attribute of the control.

Attr

value: string = ''

The value of the control.

Attr

styles: CSSResult = styles
tagName: "igc-input" = 'igc-input'

Methods

  • Type Parameters

    • K extends keyof IgcInputEventMap

    • D extends string | void

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean

  • Sets focus on the control.

    Parameters

    • Optional options: FocusOptions

    Returns void

  • Checks for validity of the control and shows the browser message if it's 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

  • Replaces the selected text in the input.

    Parameters

    • replacement: string
    • start: number
    • end: number
    • selectMode: "end" | "start" | "select" | "preserve" = 'preserve'

    Returns void

  • Sets the text selection range of the control

    Parameters

    • start: number
    • end: number
    • direction: "none" | "forward" | "backward" = 'none'

    Returns void

  • Decrements the numeric value of the input by one or more steps.

    Parameters

    • Optional n: number

    Returns void

  • Increments the numeric value of the input by one or more steps.

    Parameters

    • Optional n: number

    Returns void

  • Parameters

    • controller: ThemeController

    Returns void