A simple and best input component for react.
v1.0.4
- extends onBlur, onKeyUp and onKeyDown from normal input.
git clone https://github.com/luffyZh/react-best-input.git
cd demo
yarn install
yarn start
yarn add react-best-input || npm install react-best-input --save
// in the components
import BestInput from 'react-best-input'
...
<BestInput />
- value: [string], The BestInput value.
- placeholder: [string].
- label: [string]. Automatically add prefixes label.
- timer: [number]. Add the debounce function for BestInput.
- error: [boolean]. Automatically add error status.
- errMsg: [string]. Automatically add errMsg under the input.
- addons: [string]. Automatically add hint info under the input.
- charBase: [object]. You can custom the char base length, default
{ 'zh-cn': 1, 'eng': 1 }
- onChange(e, value): [Function]. BestInput onChange function.
- getLength(length): [Function]. Get the BestInput's custom value length.
- ...Others. Follow-up development.