react-input React component


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Dec 17, 2018May 28, 2018Minified + gzip package size for @crpt/react-input in KB



Travis npm package Coveralls

React input component.


import { Input } from  "@crpt/react-input";

<Input onChange={newVal => alert("newVal:", newVal)} />
PropName Description Example
disabled: Boolean Can be disabled. <Input disabled />
isError: Boolean Changes colors to error. <Input isError={true} />
defaultValue: String Preset value. <Input defaultValue="vasya@gmail.com" />
placeholder: String Placeholder value. <Input placeholder="Имя пользователя" />
onChange: Function Callback for change event. <Input onChange={val => alert(val)} />
onUpdate: Function Fires on enter press or blur. <Input onUpdate={val => alert(val)} />
onEnterKey: Function Fires on enter key press. <Input onEnterKey={val => alert(val)} />
type: String Input type attribute. For example type="text" and type="password". <Input type="password" />
rightIcon: String Right icon. <Input rightIcon={<Icon type="calendar"/>} />
mask: String Input mask. <Input mask="+7 (999) 999-99-99" />
maskOptions: Object Input mask options. <Input mask="+7 (999) 999-99-99" maskOptions={{numericInput: true, placeholder: '0'}} />

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.