API and Development
Input from @prepared911/ui/input is the native text control. It has no label, no icons, and no mask. A labeled field is Field from @prepared911/ui/field.
onValueChange(value, details) replaces onChange(event).
| Prop | Meaning |
|---|---|
value / defaultValue | The text. |
onValueChange | Next value and a reason. |
size | InputSize. |
textType | TextType.Body (default), TextType.Code1 or TextType.Code2. A code role sets the monospace font for URLs, ids and other text read character by character. |
disabled / readOnly / required | Native states. |
name | Submitted with the form. |
textType to a monospace role for a URL, an id or another value read character by character. It reuses Text's TextType, so there is no font token or className to pass, and the control keeps its height.
Field.
| Prop | Meaning |
|---|---|
label | Visible name. |
leadingIcon / trailingIcon | Decorative icons. |
action | One button at the end. Search and Password own their own trailing control. |
type | FieldType, including Email, Tel, Search, and Password. |
mask | A mask. Not a separate enum on Input. |
description / error | Helper and error copy. |
FieldType.Tel.