Anvil’s builtin DropDown component uses the browser’s native <select>
and <option>
elements.
There is no real way to style the <option>
elements of a <select>
element.
Any solutions don’t typically work cross-browser or cross-platform.
Here’s an example of the same question at stackoverflow, which might provide more context:
css - How to style the option of an HTML select element? - Stack Overflow
If this is important to your app, you might find the anvil-extras multi-select dropdown works for you. It doesn’t use the browser’s native select
element and the options can therefore be styled. Though you’ll have to play around with dev tools to work out exactly what css you need to change.