Member Properties

Map object properties to component features using member attributes:

AttributeTypeDefaultDescription
value-memberstring-Property name for extracting unique ID/value from items
display-value-memberstring-Property name for extracting display text from items
search-value-memberstring-Property name for extracting searchable text from items
icon-memberstring-Property name for extracting icon/emoji from items
subtitle-memberstring-Property name for extracting subtitle/description from items
group-memberstring-Property name for extracting group name from items
disabled-memberstring-Property name for determining if item is disabled

Value Formatting

Control how selected values are serialized:

AttributeTypeDefaultDescription
value-format'json' | 'csv' | 'array''json'Format for serializing selected values. See Value Format examples

Note: The getValueFormatCallback property (not HTML attribute) allows custom serialization logic.

Form Integration

Configure HTML form integration with hidden inputs:

AttributeTypeDefaultDescription
namestring-HTML form field name for hidden input(s). See Form Integration examples

Hidden inputs are created automatically and use the format specified by value-format.

Boolean Options

Enable or disable features:

AttributeTypeDefaultDescription
multiplebooleantrueAllow multiple selections
enable-searchbooleantrueEnable search/filtering functionality
allow-groupsbooleantrueEnable grouping of options
allow-select-allbooleantrueShow 'Select All' button
allow-clear-allbooleantrueShow 'Clear All' button
show-checkboxesbooleantrueShow checkboxes next to options
sticky-actionsbooleantrueKeep Select All/Clear All buttons fixed at top
close-on-selectbooleanfalseClose dropdown after selecting an option
lock-placementbooleantrueLock dropdown placement after first open
allow-add-newbooleanfalseAllow adding new options not in the list
show-counterbooleanfalseShow counter next to toggle icon
enable-pill-tooltipsbooleanfalseEnable tooltips on selected item pills. See Advanced Features
show-debug-infobooleanfalseDisplay debug information panel showing component state (development tool)

Text Options

Customize text labels and messages:

AttributeTypeDefaultDescription
search-placeholderstring'Search...'Placeholder text for search input
search-hintstring-Hint text shown above input when focused
empty-messagestring'No results found'Message shown when no results found
loading-messagestring'Loading...'Message shown while loading async data

Note: For count text formatting with i18n/pluralization, use the getCountBadgeCallback property (JavaScript callback: (count: number, moreCount?: number) => string). When moreCount is provided, it's for the "+X more" badge in partial mode.

Display Options

Control visual appearance and layout:

AttributeTypeDefaultDescription
pills-display-mode'pills' | 'count' | 'compact''pills'How to display selected items in the pills area
pills-position'top' | 'bottom' | 'left' | 'right''bottom'Where to place pills relative to input
pills-thresholdnumbernullTrigger threshold mode after N selections
pills-threshold-mode'count' | 'partial''count'Behavior when threshold exceeded: 'count' shows counter, 'partial' shows limited pills + more badge. See Advanced Features
pills-max-visiblenumber3Maximum pills to show in partial mode (used with pills-threshold-mode='partial')
pill-tooltip-placement'top' | 'bottom' | 'left' | 'right''top'Tooltip placement relative to pill (requires enable-pill-tooltips="true")
pill-tooltip-delaynumber300Delay in milliseconds before showing tooltip (requires enable-pill-tooltips="true")
pill-tooltip-offsetnumber8Distance in pixels between pill and tooltip (requires enable-pill-tooltips="true")
search-input-mode'normal' | 'readonly' | 'hidden''normal'Search input display mode

Sizing Options

Control dimensions and limits:

AttributeTypeDefaultDescription
dropdown-min-widthstring (CSS value)-Minimum width for dropdown (e.g., '20rem', '300px')
max-heightstring (CSS value)'20rem'Maximum height for dropdown
min-search-lengthnumber0Minimum characters required before loading data

Initial Values

Set default selected values:

AttributeTypeDefaultDescription
initial-valuesstring (JSON array)-Initial selected values as JSON array (e.g., '[1,2,3]')

💡 Usage Tips

  • Boolean Attributes: Set to "false" to disable (e.g., multiple="false")
  • Kebab-case: All attributes use kebab-case in HTML (e.g., pills-display-mode)
  • Member vs Callback: Use member attributes for simple property mapping, callbacks for complex logic
  • Initial Values: Must be valid JSON array when using initial-values attribute
  • CSS Values: Sizing attributes accept any valid CSS unit (px, rem, em, %, etc.)