how to resize the font of "No Options"?

Viewed 37

I'm using Autocomplete from material-ui and trying to make the font size of "No Options" to be aligned with other fonts. I have tried to use styled component to set the font size but it didn't work. Is there a way to resize it smaller? Thank you

Here is how it currently looks like

1 Answers

You can style "No Options" with class name MuiAutocomplete-noOptions;

.MuiAutocomplete-noOptions {
   font-size: 16px;
   // 
}

From Mui Autocomplete documentation: https://mui.com/material-ui/api/autocomplete

noOptions .MuiAutocomplete-noOptions Styles applied to the no option wrapper.

Related