Install package:
npm install mdl-form mdl-form-input react jquery
You need to see mdl-form.
default
-> value of inputtype
-> type of input(default: text)className
-> add classstyle
-> change stylemax
-> max-length of inputregular_expression
-> pattern of inputlabel
-> name of inputerror
-> text of error will show when it is empty or it is not correspond toregular_expression
.isNotRequire
-> if you useisNotRequire: true
, it can be empty.change
(function) -> you can do something when input is changed.1st
argument is this component value.
{
'id': 'component_id',
'label': 'Label',
'className': 'class',
'style': {'color': 'red'},
'error': 'Error',
'regular_expression': '[A-Z]+',
'max': '5',
'isNotRequire': true,
'default': 'default',
'type': 'text'
}