Zero-dependency select web component. Native on mobile, keyboard-accessible, themeable. Try it on touch devices too.
Single choice with a placeholder.
selected on an option sets the initial value.
multiple — value becomes an array.
searchable — built-in local filter with highlight.
onsearch(query) returns matching values (simulated 400ms latency).
search-mode="remote": results come entirely from the server, including options that were never declared.
<optgroup> renders section headers.
Disabled options and a fully disabled control.
Restyled purely via CSS variables — no JS, no overrides of internals.
#fancy {
--cs-bg: linear-gradient(135deg, #6d28d9, #db2777);
--cs-text: #fff;
--cs-border: rgba(255,255,255,.25);
--cs-border-radius: 14px;
}
Works as a native form field via ElementInternals. Submit reads from FormData.
FormData will appear here…