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

Index

Constructors

Properties

autocomplete: string

The autocomplete attribute of the control.

autofocus: boolean

The autofocus attribute of the control.

dir: Direction = 'auto'

The direction attribute of the control.

disabled: boolean = false

Makes the control a disabled field.

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

The input mode attribute of the control.

invalid: boolean = false

Controls the validity of the control.

label: string

The label for the control.

max: string | number

The max attribute of the control.

maxlength: number

The maxlength attribute of the control.

min: string | number

The min attribute of the control.

minlength: number

The minlength attribute of the control.

name: string

The name attribute of the control.

outlined: boolean = false
pattern: string

The pattern attribute of the control.

placeholder: string

The placeholder attribute of the control.

readonly: boolean = false

Makes the control a readonly field.

required: boolean = false

Makes the control a required field.

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

Determines the size of the component.

step: number

The step attribute of the control.

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

The type attribute of the control.

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

Methods

  • blur(): void
  • connectedCallback(): void
  • emitEvent<K, D>(type: K, eventInitDict?: CustomEventInit<D>): boolean
  • Type Parameters

    • K extends keyof IgcInputEventMap

    • D extends string | void

    Parameters

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

    Returns boolean

  • focus(options?: FocusOptions): void
  • reportValidity(): boolean
  • select(): void
  • setCustomValidity(message: string): void
  • 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

  • setRangeText(replacement: string, start: number, end: number, selectMode?: "end" | "start" | "select" | "preserve"): void
  • Replaces the selected text in the input.

    Parameters

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

    Returns void

  • setSelectionRange(start: number, end: number, direction?: "none" | "forward" | "backward"): void
  • Sets the text selection range of the control

    Parameters

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

    Returns void

  • stepDown(n?: number): void
  • stepUp(n?: number): void
  • themeAdopted(controller: ThemeController): void