Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

material-react-input-text-field

TerryLee77884ISC1.0.5

react material input text field

react, material, material input, material text field

readme

Coverage Status undefined

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

Name Description
value Can Controlled or Uncontrolled component
placeHolder just input placeholder
handleChange handle input change event
variant now have "standard", "filled"
...rest you can add any type of attributes if you want