← All Components
<mth-multi-select>
Form-associated multi-select combobox with removable tag chips, search filtering, keyboard navigation, and top-layer popover listbox.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-multi-select>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/multi-select"></script>
<mth-multi-select max-selections="0"></mth-multi-select>import '@methane-ui/ui/multi-select';
import '@methane-ui/react';
export function Example() {
return <mth-multi-select max-selections="0"></mth-multi-select>;
}<script setup lang="ts">
import '@methane-ui/ui/multi-select';
</script>
<template>
<mth-multi-select max-selections="0"></mth-multi-select>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/multi-select';
import { MthMultiSelectDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthMultiSelectDirective],
template: `<mth-multi-select max-selections="0"></mth-multi-select>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/multi-select';
import MthMultiSelect from '@methane-ui/svelte/MthMultiSelect.svelte';
</script>
<MthMultiSelect max-selections="0"></MthMultiSelect>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
name | name | string | "" | Form field name. |
value | value | string | "" | Comma-separated string of selected option values. |
defaultValue | default-value | string | "" | Default comma-separated value restored on form reset. |
options | — | ReadonlyArray<unknown> | null | null | Available selectable options. |
label | label | string | "" | Field label. |
placeholder | placeholder | string | "" | Placeholder shown when no options are selected. |
hint | hint | string | "" | Helper message. |
error | error | string | "" | Validation error message. |
open | open | boolean | false | Controls dropdown visibility. |
disabled | disabled | boolean | false | Disables interaction. |
required | required | boolean | false | Requires at least one selected value. |
maxSelections | max-selections | number | 0 | Maximum number of allowed selections (0 means unlimited). |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-change | { value: string; values: ReadonlyArray<string> } | Fired when selected values change. |
mth-open | undefined | Fired before opening the listbox overlay (cancelable). |
mth-after-open | undefined | Fired after opening the listbox overlay. |
mth-close | undefined | Fired before closing the listbox overlay (cancelable). |
mth-after-close | undefined | Fired after closing the listbox overlay. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowDown / ArrowUp | both | combobox open | navigates active option |
| Enter | both | option active | toggles active option selection |
| Backspace | both | search input empty and tags exist | removes last selected tag |
| Escape | both | listbox open | closes listbox and restores focus |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 4 APG keyboard transitions across LTR/RTL. | mth-multi-select.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(dirty), :state(touched), :state(user-invalid), :state(disabled), :state(required). | Conformance suite |
| i18n | Routes 7 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |