Skip to main content

Input

Ask AIView as Markdown
Copy a prompt to ask an AI assistant about this page.

Input fields allow users to enter and edit single-line text, numbers, and other character-based symbols within an application.

Input - Code

Basic​

Disabled​

Label​

Pattern​

Readonly​

Types​

Validation​

Slots​

API for ix-input​

Properties​

Description

The allowed characters pattern for the text field.

Attribute
allowed-characters-pattern
Type
string | undefined
Description

Specifies whether the text field is disabled.

Attribute
disabled
Type
boolean
Default
false
Description

The helper text for the text field.

Attribute
helper-text
Type
string | undefined
Description

The info text for the text field.

Attribute
info-text
Type
string | undefined
Description

The error text for the text field.

Attribute
invalid-text
Type
string | undefined
Description

The label for the text field.

Attribute
label
Type
string | undefined
Description

The maximum length of the text field.

Attribute
max-length
Type
number | undefined
Description

The minimum length of the text field.

Attribute
min-length
Type
number | undefined
Description

The name of the text field.

Attribute
name
Type
string | undefined
Description

The pattern for the text field.

Attribute
pattern
Type
string | undefined
Description

The placeholder text for the text field.

Attribute
placeholder
Type
string | undefined
Description

Specifies whether the text field is readonly.

Attribute
readonly
Type
boolean
Default
false
Description

Specifies whether the text field is required.

Attribute
required
Type
boolean
Default
false
Description

Specifies whether to show the text as a tooltip.

Attribute
show-text-as-tooltip
Type
boolean | undefined
Description

If false, pressing Enter will submit the form (if inside a form).

Set to true to suppress submit on Enter.

Attribute
suppress-submit-on-enter
Type
boolean
Default
false
Description

Text alignment within the input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.

Attribute
text-alignment
Type
"end" | "start"
Default
'start'
Description

The type of the text field. Possible values are 'text', 'email', or 'password'.

Attribute
type
Type
"email" | "password" | "tel" | "text" | "url"
Default
'text'
Description

The valid text for the text field.

Attribute
valid-text
Type
string | undefined
Description

The value of the text field.

Attribute
value
Type
string
Default
''
Description

The warning text for the text field.

Attribute
warning-text
Type
string | undefined

Methods​

Events​

Description

Event emitted when the text field loses focus.

Event
ixBlur
Detail
void
Description

Event emitted when the text field loses focus and the value has changed.

Event
ixChange
Detail
string
Description

Event emitted when the validity state of the text field changes.

Event
validityStateChange
Detail
ValidityState
Description

Event emitted when the value of the text field changes.

Event
valueChange
Detail
string

Slot​

Description

Element will be displayed at the end of the input

Description

Element will be displayed at the start of the input