Actions and inputs
Multi-select
Several values from a list, shown as chips. <kui-multiselect> draws a field with chips and a filtered list over a native <select multiple>, which keeps the chosen values for the form.
Examples
Languages a person speaks
Type to filter, then press Enter or tap an option to add or remove it; the list stays open for the next one. Each chip has its own remove button.
Choose all that apply.
<div class="kui-field">
<label class="kui-label" for="multiselect-langs">Languages you speak</label>
<kui-multiselect class="kui-multiselect" placeholder="Add a language">
<select id="multiselect-langs" name="languages" multiple aria-describedby="multiselect-langs-hint">
<option selected>English</option>
<option selected>Srpski (latinica)</option>
<option>Српски (ћирилица)</option>
<option>Deutsch</option>
<option>Français</option>
<option>Italiano</option>
<option>Português</option>
<option>Svenska</option>
<option>中文</option>
</select>
</kui-multiselect>
<p class="kui-hint" id="multiselect-langs-hint">Choose all that apply.</p>
</div>
Many chips
Chips wrap onto new lines and the field grows. A long name is cut with an ellipsis inside its chip.
<div class="kui-field">
<label class="kui-label" for="multiselect-tags">Labels of the task</label>
<kui-multiselect class="kui-multiselect" placeholder="Add a label">
<select id="multiselect-tags" name="labels" multiple>
<option selected>Urgent</option>
<option selected>Customer Đorđević</option>
<option selected>Invoices</option>
<option selected>Datenschutzfolgenabschätzung</option>
<option selected>Q4 2026</option>
<option>Legal</option>
<option disabled>Archived (cannot be added)</option>
</select>
</kui-multiselect>
</div>
Without JavaScript
Before the kit loads the person sees the native list box, where Ctrl or Cmd with a click chooses several. The values submit the same way.
<div class="kui-field">
<label class="kui-label" for="multiselect-plain">Days of delivery</label>
<div class="kui-select">
<select id="multiselect-plain" multiple size="4">
<option selected>Monday</option><option>Tuesday</option><option selected>Wednesday</option><option>Thursday</option><option>Friday</option>
</select>
</div>
</div>
States
Every state
Empty, the field shows its placeholder. Focus shows the ring around the whole box and opens the list. A chosen option is bold with a tick; a disabled one is faded and cannot be chosen. When the filter finds nothing the list says “No results”.
<div class="kui-field">
<label class="kui-label" for="multiselect-s1">Empty</label>
<kui-multiselect class="kui-multiselect" placeholder="Add a city">
<select id="multiselect-s1" multiple><option>Beograd</option><option>Novi Sad</option><option>Niš</option></select>
</kui-multiselect>
</div>
Classes and attributes
kui-multiselect.kui-multiselect- Wraps one select multiple. The select is hidden once the element runs and stays the form’s value.
placeholder- The text in the empty typing field.
option selected, disabled- Chosen at the start; cannot be chosen.
.kui-multiselect__box, .kui-chip, .kui-chip__remove- The box with the chips and the typing field, drawn by the element.
event change- Fired on the select whenever a value is added or removed.
Keyboard
- Down or Up
- Moves through the options.
- Enter
- Adds or removes the marked option; the list stays open.
- Backspace
- In the empty field, removes the last chip.
- Escape
- Closes the list.
- Tab
- Moves to the chips’ remove buttons and on.
Accessibility
- The typing field is a combobox with a multi-select list (aria-multiselectable), labelled by the select’s label.
- Each change is announced with the count chosen (“3 selected”), from the kit’s words.
- Every chip has a remove button named “Remove English”, and focus goes back to the field after it.
- The hint of the select is moved to the typing field with aria-describedby.
Do and do not
Do
- Use it when a person picks a few values from a list of more than about eight.
- Order the options as a person expects them.
- Say in the hint if there is a limit.
Do not
- Do not use it for two to six options; checkboxes show them all.
- Do not use chips for one value; use a combobox or a select.
- Do not hide chosen values behind “+3”; let the field grow.