TextField
Text fields let users enter and edit text.
#
When to useWhen a maxLength and label needs to be provided.
#
Examples#
Basic#
With maxLength12
#
With textarea#
With textarea & maxLength100
#
With textarea & error#
With maxLength & error12
#
With empty label30
#
With controlled value switch18
#
APIProperty | Description | Type | Default |
---|---|---|---|
label | The label text | string | |
value | value of the TextField | string | |
defaultValue | defaultValue of the TextField | string | |
maxLength | The content max length of textfield | number | |
textarea | Whether the input is a textarea | boolean | false |
disabled | Disabled the TextField | boolean | false |
If you are using textarea
props, you can consult Input's documentation to find more
textarea
APIs.