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

115
Views
Change default material ui radio checked color

I have taken a look at other threads relating to this but unfortunately I am not able to change the material ui default red checked colour.

Here is my code below:

   return (
        <FormControl>
            <FormLabel>{label}</FormLabel>
            <RadioGroup row
                name={name}
                value={value}
                onChange={onChange}
                {
                    items.map(
                        item => (
                            <FormControlLabel key={item.id} value={item.id} control={<Radio />} label={item.title} />
                        )
                    )
                }
            </RadioGroup>
        </FormControl>
    )

I simply want to be able to change the checked radio color from red to blue.

I have tried the following but didn't work:

<Radio
  {...props}
  sx={{
    '&, &.Mui-checked': {
      color: 'blue',
    },
  }}
/>
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Because you use 2 selectors - & and &.Mui-checked you overwrite the color of your checkbox in an unchecked state. Therefore, you should get rid of & and everything will work fine:

      <Radio
        {...props}
        sx={{
          color: "red",
          "&.Mui-checked": {
            color: "green"
          }
        }}
      />

Demo

about 4 years ago · Santiago Gelvez 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!