using Material UI V5 and i can't change the border color of my TextField with the sx
prop.
Changing the color of the label and input works fine, but not with border color.
<TextField
sx={{
input: { color: 'white' } ,
label: {color: 'white'},
borderColor: 'white',
border: {color: 'white'},
}}
Any ideas?
The TextField is a weird one, the border is actually defined on the fieldset element. The following should style that.
<TextField
sx={{
fieldset: { borderColor: "red" }
}}
Here is a screen capture of the TextField HTML to help show the fieldset element I'm talking about.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With