Field
Labelled input. Props: label, value, onChange (receives the value string), placeholder, error, type, autoComplete, required (default false; sets the native required and aria-required).
helperText shows a hint under the field while there is no error, and links it to the control with aria-describedby. Select, TextArea and PasswordInput take it too.
Shown until there is an error
Props
helperTextReactNodeHint under the field while there is no
error; linked witharia-describedby.labelstringLabel text.
valuestringCurrent value.
onChange(value: string) => voidCalled with the new value.
placeholderstringPlaceholder text.
errorstringError message shown below the control; sets the invalid style.
typestringDefault:'text'Native input type.
autoCompletestringDefault:'off'Native autocomplete attribute.
requiredbooleanDefault:trueSets aria-required.
...inputPropsPassed to the <input>.
| Prop | Type | Default | Description |
|---|---|---|---|
helperText | ReactNode | – | Hint under the field while there is no error; linked with aria-describedby. |
label | string | – | Label text. |
value | string | – | Current value. |
onChange | (value: string) => void | – | Called with the new value. |
placeholder | string | – | Placeholder text. |
error | string | – | Error message shown below the control; sets the invalid style. |
type | string | 'text' | Native input type. |
autoComplete | string | 'off' | Native autocomplete attribute. |
required | boolean | true | Sets aria-required. |
...inputProps | – | Passed to the <input>. |