Diwa Design System

Multi Select

Multi Select allows users to choose one or more options from a filterable dropdown list. Supports keyboard navigation, validation states, and dense mode (compact) for space-constrained layouts.

diwa-multi-select — Properties

NameTypeDefaultDescription
theme'light' | 'dark''dark'Per-component theme override. Sets data-theme on the host so token overrides cascade into Shadow DOM.
labelstringundefinedVisible label text. Also used as the placeholder when no options are selected.
descriptionstringundefinedOptional hint text rendered between the label and the trigger.
namestring''Field name emitted in the change event detail.
valuestring[][]Currently selected values. Mutable — updated by user interaction and programmatic assignment.
state'none' | 'error' | 'success''none'Validation state. Changes trigger border colour and message text colour.
messagestringundefinedHelper or validation message. Only rendered when state is "error" or "success".
hide-labelbooleanfalseHides the label visually using a sr-only clip pattern. The label is still read by screen readers.
disabledbooleanfalseDisables all interaction. The trigger loses tabIndex and its opacity is reduced.
requiredbooleanfalseMarks the field as required with a visual asterisk and sets aria-required on the trigger.
compactbooleanfalseReduces the trigger and option row heights for dense layout contexts.
dropdown-direction'auto' | 'down' | 'up''auto'Controls which direction the panel opens. 'auto' flips upward when there is insufficient space below.

diwa-multi-select — Events

NameDetail typeBubblesDescription
change{ name: string; value: string[] }YesEmitted when the selection changes. detail.value is the full updated array of selected values.
toggle{ open: boolean }NoEmitted when the dropdown opens or closes.
blurvoidNoEmitted when the dropdown closes due to a click outside the component.

React 19: use lowercase event names as props: onchange, ontoggle, onblur.

diwa-multi-select — Methods

SignatureDescription
open(): Promise<void>Programmatically opens the dropdown panel.
close(): Promise<void>Programmatically closes the dropdown panel.

diwa-multi-select — Slots

NameDescription
(default)diwa-multi-select-option elements.
labelCustom label content — overrides the label prop.
descriptionCustom description content.
messageCustom message content.
selectedCustom selected-value display inside the trigger.
filterCustom filter input; disables the built-in text filter.
options-statusLoading indicator or custom empty state for async patterns.

diwa-multi-select-option — Properties

NameTypeDefaultDescription
valuestringrequiredThe value emitted when this option is selected. Must be unique within the multi-select.
disabledbooleanfalseDisables the option — it cannot be selected or focused.
selectedbooleanfalseWhether the option is currently selected. Managed by the parent; can be set to pre-select.
highlightedbooleanfalseWhether the option is keyboard-highlighted. Set exclusively by the parent component.
compactbooleanfalseDense mode (compact) — inherited automatically from the parent diwa-multi-select.
theme'light' | 'dark''dark'Theme — inherited automatically from the parent diwa-multi-select.