kor TürkçeGitHub

TextField

Provides a labeled single-line or multiline input.

kor/ui/TextFieldSource

When to use

  • Collect a short value or a note and show validation beside the field.

Examples

A reference field

Loading the example

<k:TextField label="Reference" placeholder="SO-104" icon="search" change=".onChange"/>

Validate a packing note

Loading the example

<k:TextField label="Packing note" rows="3" required="true" help="Mention any special packing instructions." change=".onChange"/>

API

Properties

NameTypeDefaultDescription
valuestringField value
labelstringField label
placeholderstringPlaceholder
helpstringSupporting text
errorstringValidation message. A nonempty message marks the field invalid
iconstringLeading icon
unitstringTrailing unit or suffix
typestringtexttext, email, tel, url, search, password or date
rowsint1Number of rows. More than one creates a multiline field
requiredbooleanfalseWhether a value is required
enabledbooleantrueWhether the field can be used

Events

NameTypeDescription
changevalue: stringThe value changed when the user left the field
liveChangevalue: stringThe user edited the value

Related

FormNumberField