I do not really understand what is the problem with flexible <select> implementation in browser.
In my Sciter[1] the following are supported ( see screenshot [2] ):
<select type="dropdown"> - select with popup
<select type="list"> - select list
<select type="tree"> - hierarchical select (a.k.a. tree view)
and all of them may have <select multiple> - multi-select, value = array[]
<select multiple="checkmarks"> - multi-select, value = array[]
select type="tree" may have also <select type="tree" treelines> - draw treelines
<select> and <option>'s may have arbitrary markup inside (<hr>,<img>, whatever), even more any DOM element may have role="option" defined making it a selectable option : <li role="option">...</li>
<option value="Sc"><code>Sc</code>Scandium</option>
And as a bonus, by declaring different flows in CSS in list you may have: select { flow:horizontal; } // horizontal select
select { flow:vertical-wrap; } // multicolumn select
[1] https://sciter.com
[2] https://sciter.com/wp-content/uploads/2024/01/select-variant...