Native select item color

Is it possible to give different colors for each and every element of the Native select.

Generally not since tags in are not allowed to have HTML inside.

Seems like a generally useful widget, though, an HtmlSelect that would not use a SELECT, but perhaps a selectable Table… ListSelect sort of does this, but it’s UI does not look like a drop down box but appears as a scrollable list instead. Not sure if anything in the Directory does this already…

Hi,

styling of the elements is not supported by NativeSelect. You could write your own component which would support this but even then there are differences between browsers on which style attributes are supported for elements, although I think the text color can be changed in pretty much every browser.


Tepi

thanks David and Teppo for the inputs