

Typically it's only possible to style the unopened state (<Select>) through css. The opened state (<option>) is very problematic.
If you were to create a custom select you need to take into account:
- There is a button that contains the current selected option.
- Clicking the box toggles the visibility of the options list (also called listbox).
- Clicking an option in the listbox updates the selected value. The button text changes and the listbox is closed.
- Clicking outside the component closes the listbox.
- The trigger contains a small triangle icon pointing downward to indicate there are options.
In addition to this a native select provides:
- The checked option is perceivable for all users regardless of their visual abilities.
- The component can interact with a keyboard in a predictable way across all browsers (e.g. using arrow keys to navigate,
Enter
to select, Esc
to cancel, etc.).
- Assistive technologies (e.g. screen readers) announce the element clearly to users, including its role, name and state.
- The listbox position is adjusted. (i.e. does not get cut off of the screen).
- The element respects the user’s operating system preferences (e.g high contrast, color scheme, motion, etc.).