1.0.5 • Published 4 years ago

material-react-input-text-field v1.0.5

Weekly downloads
34
License
ISC
Repository
github
Last release
4 years ago

React Material Inputs

Installation

npm i material-react-input-text-field

Usage

import InputField from 'material-react-input-text-field'

const App = () => {

    const [name, setName] = useState('')
    const handleChange = (value) => {
        setName(value)
    }

    return (
        <div>
            <h1>React-material InputField</h1>
            <h3>Examples:</h3>
            <div className={styles.examples}>
                <div>
                    <InputField
                        value={name}
                        placeHolder="Standard"
                        handleChange={handleChange}
                    />
                </div>
                <div>
                    <InputField
                        value="terry"
                        placeHolder="Filled"
                        variant="filled"
                    />
                </div>
            </div>
            <div>
                {name && `hi, ${name}`}
            </div>
        </div>
    )

};

Overview

NameDescription
valueCan Controlled or Uncontrolled component
placeHolderjust input placeholder
handleChangehandle input change event
variantnow have "standard", "filled"
...restyou can add any type of attributes if you want
1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago