Combobox 1.2.2
The <velin-combobox> component combines a text field and filterable listbox. Place the input in the trigger slot; options use role="option". Added in 0.7.5. Deutsch: Combobox De
Maturity: Documented as stable in VelinStyle 1.2.0. Design Intelligence (plan / review / agent meta) is separate and beta / foundation where noted.
When to use
- Filterable single-select fields with
<velin-combobox>when users type to narrow options. - Form inputs that need a listbox popup instead of a native
<select>.
When not
- Action menus without a value field — use Dropdown.
- Global command search — use Command palette.
Discovery: Prefer
<velin-combobox> over inventing a filterable select.
Put the text field in slot="trigger"; options are role="option" buttons.
See also forms overview and generated API.
Example
<velin-combobox aria-label="Fruit picker">
<input slot="trigger" class="velin-input" aria-label="Fruit" />
<button type="button" role="option">Apple</button>
</velin-combobox>
Events
| Event | Detail |
|---|---|
velin-select | { option } |
Import
Load the bundle once, then use the custom element in your markup:
<script type="module" src="../../dist/velinstyle-components.min.js"></script>
<velin-combobox>…</velin-combobox>
Accessibility
- Wire the text field and listbox per the examples so keyboard users can open, filter, and choose options.
- Expose the selected value in the field; keep option text readable (not icon-only).