Skip to content

luffyZh/react-best-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-best-input

A simple and best input component for react.

中文版-README

Version

v1.0.4

  • extends onBlur, onKeyUp and onKeyDown from normal input.

Example

git clone https://github.com/luffyZh/react-best-input.git
cd demo
yarn install
yarn start

Usage

yarn add react-best-input || npm install react-best-input --save
// in the components
import BestInput from 'react-best-input'
...
<BestInput />

Props

  • 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.

About

A simple and best input component for react.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published