HTML Element - select

Image of Author
October 12, 2022 (last updated October 18, 2022)

It is reasonable to "roll your own" select

This is not an easy decision to make. "Rolling your own" select will be time consuming and you likely will not get it right on first pass, and will have to refine over time with real-world experience.

In the MDN Docs for the select element, they write the following in Styling with CSS

The <select> element is notoriously difficult to style productively with CSS.

The element's internal structure is complex, and hard to control. If you want to get full control, you should consider using a library with good facilities for styling form widgets, or try rolling your own dropdown menu using non-semantic elements, JavaScript, and WAI-ARIA to provide semantics.