Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
My material UI custom classes are being overridden by material UI's default classes

I have a TextField whose label I want to be colored as black when it is focused. I added the classes to InputProps with that classes variable but unfortunately, it is being overridden by material UI's default styling in chrome dev tools. Here is the code. Please check the screenshot of chrome dev tools.

const useStyles = makeStyles((theme) => ({
inputLabelFocused: {
color: "black",
 },
}));

const classes = useStyles();

<TextField
      id="toDo"
      label="To Do"
      multiline
      rows={4}
      variant="filled"
      fullWidth
      InputLabelProps={{
        classes: {
          focused: classes.inputLabelFocused,
        },
      }}
    />

image of custom classes being overridden by default material UI classes in chrome dev tools

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

const useStyles = makeStyles({
  inputLabelFocused: {
    color: "black !important",
  },
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!