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

320
Views
What is the way to color the Autocomplete chips in MUI reactjs

I have been trying to color the Autocomplete from MUI like the way i have described below based on some if conditions. Couldn’t find a way to do it.

enter image description here

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

0

you can try this

add MuiChip-label class in css

.MuiChip-label
{
   color:#fff !important;
}
about 4 years ago · Juan Pablo Isaza Report

0

Autocomplete component has renderTags property which takes an array of selected values and return chips. Therefore, you can customize the chip color (by using predefined theme colors via color prop or setting background color with sx prop) based on your condition:

      <Autocomplete
        multiple
        renderTags={(value: readonly string[], getTagProps) =>
          value.map((option: string, index: number) => (
            <Chip
              key={index}
              variant="outlined"
              label={option}
              sx={{background: value === "A" ? 'red' : 'green'}}
            />
          ))
        }
       ...other props
      />

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!