How to add CSS class to options layout in Ui.select

{ view:“select”, label:“Version”, options:[“1.0”, “1.5”, “2.0”]}

Hello @kishorech,

While it is possible to add a class to each option dynamically (the select component is based around the native HTML select, which means that the dropdown menu is basically an array of <option> tags), I wouldn’t recommend doing so, since you would have to apply a class for each individual option, and in some cases that might be an unacceptable scenario.

As a better alternative, you could add a CSS class to the select component itself, which then in turn allows you to style the options of that specific select. For example: https://snippet.webix.com/bh3g1rwk.

.c_options option {
color: red;
border-radius: 100px;
background-color:black;

}

I want to apply border-radius but it is not working

option is OS-dependent. You can’t style them like other elements.

More detailed answer: css - How to style the option of an html "select" element? - Stack Overflow

Thanks Jendrik