prefix - Renders content before the input.

suffix - Renders content after input.

helper-text - Renders content below the input.

value-missing - Renders content when the required validation fails.

type-mismatch - Renders content when the a type url/email input pattern validation fails.

pattern-mismatch - Renders content when the pattern validation fails.

too-long - Renders content when the maxlength validation fails.

too-short - Renders content when the minlength validation fails.

range-overflow - Renders content when the max validation fails.

range-underflow - Renders content when the min validation fails.

step-mismatch - Renders content when the step validation fails.

custom-error - Renders content when setCustomValidity(message) is set.

invalid - Renders content when the component is in invalid state (validity.valid = false).

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

input - The native input element.

label - The native label element.

prefix - The prefix wrapper.

suffix - The suffix wrapper.

helper-text - The helper text wrapper.

Callable

  • Returns ReactNode

Events

onChange: (args: CustomEvent<string>) => void

Emitted when the control's checked state changes.

Type declaration

onInput: (args: CustomEvent<string>) => void

Emitted when the control input receives user input.

Type declaration

Methods

  • Selects all text within the input.

    Returns void

  • Replaces the selected text in the input.

    Parameters

    Returns void

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

    Parameters

    • n: number

    Returns void

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

    Parameters

    • n: number

    Returns void

Properties

autocomplete: string

The autocomplete attribute of the control.

autofocus: boolean

The autofocus attribute of the control.

inputMode: string

The input mode attribute of the control. See relevant MDN article

max: number

The max attribute of the control.

maxLength: number

The maximum string length of the control.

min: number

The min attribute of the control.

minLength: number

The minimum string length required by the control.

pattern: string

The pattern attribute of the control.

step: number

The step attribute of the control.

type: InputType

The type attribute of the control.

validateOnly: boolean

Enables validation rules to be evaluated without restricting user input. This applies to the maxLength property for string-type inputs or allows spin buttons to exceed the predefined min/max limits for number-type inputs.

value: string

The value of the control.