Attributes accept string values (booleans as "true"/"false"). Object, array and callback values (options, actionButtons, render*) are set as JS properties on the element β€” see Callbacks and Methods.

Data members

Tell the component which property of each option holds the value, label, icon, etc. Each has a callback counterpart (see Callbacks).

AttributeTypeDefaultDescription
value-member stringβ€”Property used as the option value / id.
display-value-member stringβ€”Property used as the visible label.
search-value-member stringβ€”Property matched against while searching.
icon-member stringβ€”Property holding an icon (emoji, glyph or markup).
subtitle-member stringβ€”Property holding a secondary line under the label.
full-title-member stringβ€”Property with a long / full title, shown on badges when show-badge-full-title is on.
group-member stringβ€”Property used to group options under headers.
disabled-member stringβ€”Property that marks an option disabled.

Tree members

Enabling any path source turns on tree mode. See the Tree page.

AttributeTypeDefaultDescription
path-member v2.0.0 stringβ€”Materialized dot-path per node (e.g. "1.2.3"). Enables tree mode.
parent-path-member v2.0.0 stringβ€”Property holding the parent path.
level-member v2.0.0 stringβ€”Property holding the depth level.
has-children-member v2.0.0 stringβ€”Property flagging nodes that have children.
is-selectable-member v2.0.0 stringβ€”Property marking a node selectable (false = no checkbox, skipped by keyboard).
tree-path-separator v2.0.0 string.Separator between path segments.
checkbox-mode v2.0.0 'independent' | 'cascade'cascadeWhether checking a node cascades to its subtree. v2.2.0: now defaults to cascade (was independent) β€” checking a branch selects its whole subtree and branches render tristate. Set independent to keep per-node toggling. See the migration notes.
cascade-select-policy v2.0.0 'rolled-up' | 'leaves' | 'all'rolled-upIn cascade mode, which values are emitted.

Selection & behavior

AttributeTypeDefaultDescription
multiple booleantrueAllow selecting more than one option.
allow-groups booleantrueEnable grouping by group-member.
show-checkboxes booleantrueShow checkboxes in the option rows.
close-on-select booleanfalseClose the dropdown after each selection.
checkbox-align 'top' | 'center' | 'bottom'centerVertical alignment of the checkbox in tall rows.
allow-add-new v2.0.0 booleanfalseShow an β€œAdd …” prompt when a search yields no matches.
overlay-group v2.0.0 stringβ€”Coordinate β€œone overlay open at a time” across components sharing the group name.
group-select-mode v2.2.0 'none' | 'cascade'noneIn a flat (non-tree), multi-select, grouped list, cascade puts a tristate select-all checkbox on each group header β€” it checks/unchecks that group’s visible members and reads indeterminate when partial. The group name is never a value (getValue() / badges / form carry member values only). No effect in tree mode (use checkbox-mode) or single-select.
prune-missing-selection v2.4.0 booleanfalseWhen the options list is replaced, drop any selected value whose option is no longer present. Off by default β€” a selection that leaves the list is kept (still in getValue() and shown as a badge), which is right for search / paged lists where an item can leave the current page yet stay valid. Turn it on when a list replacement means the domain itself changed (e.g. an item deleted server-side); pruning is silent (no change).
reserve-icon-slot v2.5.0 booleanfalseReserve a fixed-width icon gutter on every option row, including icon-less ones, so labels line up in a single start column when a list mixes rows with and without an icon (icon-member / getIconCallback). Off by default (icon-less rows get no gutter). Option-level β€” identical on flat lists and trees. The slot reuses --ms-option-icon-size and --ms-option-content-gap.

Search

AttributeTypeDefaultDescription
enable-search booleantrueShow the search input.
search-mode 'filter' | 'navigate'filterFilter hides non-matches; navigate keeps all rows and jumps between matches.
search-input-mode 'normal' | 'readonly' | 'hidden'normalEditable, read-only, or no search field.
show-search-mode-toggle v2.0.0 booleanfalseShow a filter/navigate toggle inside the fullscreen overlay.
min-search-length number0Minimum characters before search fires.
search-debounce number (ms)0Debounce delay for the async searchCallback.
keep-options-on-search booleantrueKeep selected options visible while filtering.
should-keep-search-on-close booleantruePreserve the search term after closing.

Display of selected items

AttributeTypeDefaultDescription
badges-display-mode 'badges' | 'count' | 'compact' | 'partial' | 'none'badgesHow selected items are represented.
badges-position 'top' | 'bottom' | 'left' | 'right'bottomWhere the badge area sits relative to the input.
badges-threshold numberβ€”Collapse to count/partial once this many are selected.
badges-threshold-mode 'count' | 'partial'countHow the threshold collapses badges.
badges-max-visible numberβ€”In partial mode, how many badges before β€œ+X more”.
collapse-badges-below v2.0.0 number (px)β€”Force count mode when the control’s own box is narrower than this β€” container-responsive, not viewport.
show-counter booleanfalseShow a selected-count indicator in the input.
show-clear v2.0.0 booleanfalseShow an inline βœ• clear button inside the input.
show-badge-full-title booleanfalseUse the full title on badges.
enable-selected-popover v2.0.0 booleantrueAllow the selected-items popover to open (set false when you render your own selection UI).
selected-order v2.2.0 'as-selected' | 'label-asc' | 'label-desc' | 'member' | 'custom'as-selectedOrder of the selected items across badges, the partial β€œ+N more” split (which items sit behind it), and the popover. Display-only β€” getValue(), form output and getSelected() always keep insertion order, and the dropdown is never reordered. member sorts by selected-order-member / getSelectedOrderCallback; custom uses selectedOrderCompareCallback.
selected-order-member v2.2.0 stringβ€”Property used as the sort key when selected-order="member" β€” numeric keys sort numerically, everything else via a locale compare. Overridden by getSelectedOrderCallback.

Placeholders & text

AttributeTypeDefaultDescription
search-placeholder stringSearch...Placeholder for the search field.
select-placeholder stringPick an option...Shown when nothing is selected / search disabled.
empty-message stringNo results foundShown when a search yields no matches.
no-data-placeholder stringβ€”Shown when there are no options at all.
loading-message stringLoading...Shown while options are loading.
search-hint stringβ€”Small hint text under the search field.
add-new-text v2.0.0 stringAdd "{value}"Template for the add-new prompt; {value} is the typed text.
add-new-pending-text v2.0.0 stringAdding "{value}"…Template while an async addNewCallback runs.
remove-button-tooltip-text stringβ€”Format string for the badge remove tooltip; {0} = item name.
selected-popover-title v2.5.0 stringSelected Items ({count})Translatable header for the selected-items popover (also the selectedPopoverTitle property). {count} is replaced with the current selection count, so translators control both the wording and where the number sits β€” e.g. VybranΓ© poloΕΎky ({count}).
labels v2.5.0 MultiSelectLabels (property-only)β€”Partial i18n map for the component’s ARIA labels and short UI strings β€” property-only (an object, not an attribute). Set only the keys you need; the rest fall back to English. {item} / {count} interpolate. Keys: close, clearSelection, clearAllSelections, clearSearch, showFullLabel, removeItem, removeHiddenItems, groupSelectedLabel, andMore, prevMatch, nextMatch. MultiSelectLabels is exported from the package entry.

Form integration

AttributeTypeDefaultDescription
name stringβ€”Form field name for the auto-created hidden input(s).
value-format 'json' | 'csv' | 'array'jsonSerialization: ["a","b"], a,b, or repeated name[] inputs.
initial-values JSON array | CSVβ€”Initial selection (element-only). Accepts ["a","b"] or a,b.

Declarative data (element-only)

AttributeTypeDefaultDescription
data-options stringβ€”Option data as an attribute, parsed per data-options-format.
data-options-format 'json' | 'csv' | 'plain'jsonHow data-options is parsed.
data-options-splitter string,Field delimiter for CSV/plain (supports \t \n \r).
data-options-row-splitter stringnewlineRow delimiter for CSV/plain.

Responsive & presentation

AttributeTypeDefaultDescription
mobile-presentation v2.0.0 'auto' | 'floating' | 'fullscreen'autoAnchored dropdown vs full-screen sheet (element-only).
fullscreen-autofocus booleanfalseFocus the search field when the fullscreen sheet opens.
lock-placement booleantrueLock the dropdown placement after first open.
dropdown-min-width CSS lengthβ€”Minimum dropdown width.
dropdown-max-width CSS lengthβ€”Maximum dropdown width.
dropdown-width CSS lengthβ€”Sugar for --ms-dropdown-width (element-only).
max-height CSS length20remMax dropdown height before scrolling.
selected-popover-width v2.0.0 CSS lengthβ€”Fixed popover width. Defaults to the field width.

Virtual scrolling

AttributeTypeDefaultDescription
enable-virtual-scroll booleanfalseForce virtual scrolling on.
virtual-scroll-threshold number100Option count that auto-enables virtual scrolling.
option-height number (px)50Fixed row height used by virtual scroll.
badge-height number (px)36Fixed badge height for popover virtual scroll.
virtual-scroll-buffer number10Extra rows rendered above/below the viewport.

Tooltips

AttributeTypeDefaultDescription
enable-option-tooltips booleanfalseEnable tooltips on option rows.
enable-badge-tooltips booleanfalseEnable tooltips on badges.
option-tooltip-placement Placementtop-startFloating-UI placement for option tooltips.
badge-tooltip-placement PlacementtopFloating-UI placement for badge tooltips.
option-tooltip-follow-cursor booleanfalseOption tooltip tracks the pointer.
option-tooltip-delay / badge-tooltip-delay number (ms)100Show delay.
option-tooltip-offset / badge-tooltip-offset number (px)8Gap between anchor and tooltip.

Action bar

AttributeTypeDefaultDescription
actions-position 'top' | 'bottom'topWhere the action-button bar sits in the dropdown.
actions-layout 'nowrap' | 'wrap'nowrapWhether buttons wrap onto new rows.
actions-align 'stretch' | 'left' | 'right' | 'center' | 'space-between'stretchHorizontal alignment of the buttons.
sticky-actions booleantrueKeep the action bar pinned while the list scrolls.

Styling

AttributeTypeDefaultDescription
custom-styles v2.2.0 string (CSS)β€”Raw CSS injected verbatim β€” selectors and all β€” into a replaceable style slot at the top of the shadow root. The declarative, no-JavaScript twin of customStylesCallback (which still wins when both are set), so static HTML / server-rendered / no-build pages can restyle shadow-DOM internals (.ms__badge, .ms__option, …) and their own custom-rendered content. Mirrored by the customStyles property and reactive β€” changing or removing it re-applies or clears the slot.

Lifecycle

AttributeTypeDefaultDescription
defer v2.1.0 booleanfalseHold the first render. When present the component builds nothing on upgrade (reserves space only) β€” wire options, callbacks (e.g. customStylesCallback) and listeners first, then release with ready() (or by removing the attribute) so it builds once, flash-free. Latched; reflects an is-ready attribute after building. CSS hook: :host([defer]:not([is-ready])).