TextInput
Last updated
Last updated
A basic text input component that can be used in single or multi-line modes.
adornment
TYPE | DEFAULT VALUE |
---|---|
|
|
Allows to add an icon or any other component inside of a TextInput
.
adornmentPosition
TYPE | DEFAULT VALUE |
---|---|
|
|
Set this to change the position of the adornment. 'start'
is displayed on the left, and 'end'
on the right. Note: in the future, the position will be reversed in right-to-left languages.
adornmentSettings.width
TYPE | DEFAULT VALUE |
---|---|
|
|
The total width of the adornment.
adornmentSettings.padding
TYPE | DEFAULT VALUE |
---|---|
|
|
The horizontal padding of the adornment.
autofocus
TYPE | DEFAULT VALUE |
---|---|
|
|
Focus the text field when the component gets mounted.
onChange
TYPE | DEFAULT VALUE |
---|---|
| None |
The native change
event. Gets passed to either the input
element, or textarea
element if multiline
is true.
type
TYPE | DEFAULT VALUE |
---|---|
|
|
Any valid <input>
type. See MDN.
This prop is ignored if multiline
is true
.
multiline
Type: Boolean
Default: false
Set to true to use multiple lines. Internally uses a textarea
HTML element.
wide
Type: Boolean
Default: false
Set to true to obtain an input that expands horizontally.