Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material UI - TextField outlined doesn't render outline

I have just TextField directly from material UI example page with set variant "outlined". But for some reason it doesn't render outlined variant but just "classical" one. I don't want it hack it with some custom css. I have already searched for what it may be but can't find the answer. Thanks in advance for any help

<TextField
   id="outlined-multiline-static"
   label="some text"
   multiline
   rows="4"
   value={value}
   onChange={onChange}
   className={classes.textField}
   margin="normal"
   variant="outlined"
  />

CSS

textField: {
    marginLeft: theme.spacing.unit,
    marginRight: theme.spacing.unit,
},
like image 965
Maielo Avatar asked Feb 03 '26 14:02

Maielo


1 Answers

I was using wrong version of material-ui (1.5.1) which did not support variant option. Upon upgrade to latest it works

like image 156
Maielo Avatar answered Feb 06 '26 04:02

Maielo