Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material-ui textfield with label [closed]

Can anyone tell me how to make text field with label in material-ui lib

looking for something like this :

https://github.com/callemall/material-ui/blob/master/src/TextField/TextFieldLabel.jsx

but cant find it in the npm package

like image 645
Anton Arsentyev Avatar asked Jan 25 '16 15:01

Anton Arsentyev


1 Answers

You can achieve a fixed label by passing in shrink as a inputLabelProp

    <TextField
         id="standard-number"
         label="Number"
         type="number"
         InputLabelProps={{
           shrink: true,
         }}
       />
like image 191
Matt Weber Avatar answered Sep 18 '22 00:09

Matt Weber