@crpt/react-input

    1.0.29 • Public • Published

    react-input

    Travis npm package Coveralls

    React input component.

    Usage

     
    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'}} />

    Install

    npm i @crpt/react-input

    DownloadsWeekly Downloads

    33

    Version

    1.0.29

    License

    MIT

    Unpacked Size

    95.5 kB

    Total Files

    39

    Last publish

    Collaborators

    • ivanvlado
    • solnik
    • fantik217