Input

TextInputs are used to allow users to enter information like names, numbers, urls, email addresses or passwords.

Example

0/255

Usage

NameTypeDescription
defaultValuestringThe default value to put into the component, without making it controlled
requiredboolIndicates that this field is requiredDefault: false
name (required)stringThe name of this input field
labelstringThe label of the input
typeenumType, can be: 'tel', 'number', 'text', 'url', 'email'Default: 'text'
onChangefuncCalled, when the users changes something
valuestringThe value, makes this component a controlled component
linesnumberCan only be used with type=text. Increase to enable multi-line inputDefault: 1
patternstringRegular expression to validate against
minLengthnumberMin number of characters that must be provided
maxLengthnumberMax number of characters that can be provided
onInputReffuncCalled with the input field a referenceDefault: =>