How to customize single MUI textfield (or any other component)

Hello everyone,
I’m having a really bad time trying to customize a textfield in react with material ui.

What I want to do is to be able change color of label, default border, input text and placeholder.

I know I can change the theme but i don’t want that, I want to keep the original theme as it is but just override the components as I need.

I have found articles over the internet which implementation suggests using !important among others, I don’t think using !important is right.

Can anyone one guide me to a tutorial, blog, video, whatever, i just can’t get this done, please.

Are you able to post the code for the component for the textfield and the styles you are applying to it? That will help us better help you.

1 Like

I can’t do it right now, but I’ve tried many things I’ve found over the internet for the last 3 days.

Basically I just want to be able to style components independently without touching the theme. I’ve read about using the sx prop but it seems i’m missing something related to the classes injected by the components to the dom

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.