Documentation
Design
Components
Multi-Select

EccUtilsDesignMultiSelect Component

2.0.0-alpha.6
<ecc-utils-design-multi-select/>
EccUtilsDesignMultiSelect

Overview

The ecc-utils-design-multi-select component provides a way to select multiple options from a dropdown list. It features a searchable interface, keyboard navigation, and supports pre-selected values. The component displays selected items as removable badges in the trigger.

This component is composed of MultiSelect, MultiSelectTrigger, MultiSelectContent, and MultiSelectItem to create a complete multi-select interface.

Usage

Basic Multi-Select

This example shows a basic multi-select with a list of options.

AppleBananaOrangeStrawberryBlueberry

With Pre-selected Values

This example shows a multi-select with some values pre-selected.

JavaScriptTypeScriptPythonJavaRust

Components

ComponentTag NameDescription
MultiSelectecc-utils-design-multi-selectThe root container for the multi-select.
MultiSelectTriggerecc-utils-design-multi-select-triggerThe clickable trigger that shows selected values.
MultiSelectContentecc-utils-design-multi-select-contentThe dropdown content containing the options.
MultiSelectItemecc-utils-design-multi-select-itemAn individual selectable option.

Properties

EccUtilsDesignMultiSelect

PropertyTypeDefaultDescription
valuestring[][]Array of selected values.
placeholderstring"Select options..."Placeholder text when no options are selected.
disabledbooleanfalseWhen true, disables the multi-select.
namestring""The name attribute for form submissions.

value

Controls the selected values in the multi-select. This should be an array of strings matching the values of selected items.

<EccUtilsDesignMultiSelect value={['apple', 'banana']}>
  ...
</EccUtilsDesignMultiSelect>

placeholder

Text displayed when no options are selected, providing a hint to users about what to select.

<EccUtilsDesignMultiSelect placeholder="Choose your favorite fruits...">
  ...
</EccUtilsDesignMultiSelect>

disabled

When true, disables the entire multi-select, preventing user interaction.

<EccUtilsDesignMultiSelect disabled={true}>
  ...
</EccUtilsDesignMultiSelect>

name

The name attribute used when submitting the multi-select as part of a form.

<EccUtilsDesignMultiSelect name="preferences">
  ...
</EccUtilsDesignMultiSelect>

EccUtilsDesignMultiSelectTrigger

PropertyTypeDefaultDescription
disabledbooleanfalseWhen true, disables the trigger.

disabled

When true, disables the trigger button, preventing the dropdown from opening.

<EccUtilsDesignMultiSelectTrigger disabled={true} />

EccUtilsDesignMultiSelectContent

PropertyTypeDefaultDescription
positionstring"popper"The positioning strategy for the dropdown.

position

Controls how the dropdown content is positioned relative to the trigger.

<EccUtilsDesignMultiSelectContent position="item-aligned">
  ...
</EccUtilsDesignMultiSelectContent>

EccUtilsDesignMultiSelectItem

PropertyTypeDefaultDescription
valuestring""A unique value for the item.
disabledbooleanfalseWhen true, disables the item.

value

A unique identifier for the item. This value is used in the multi-select's value array when the item is selected.

<EccUtilsDesignMultiSelectItem value="apple">Apple</EccUtilsDesignMultiSelectItem>

disabled

When true, prevents the item from being selected or deselected.

<EccUtilsDesignMultiSelectItem value="premium" disabled={true}>Premium Option</EccUtilsDesignMultiSelectItem>

Events

EccUtilsDesignMultiSelect

Event NameReact Event NameDetail TypeDescription
ecc-input-changedonEccInputChanged{ value: string[] }Fired when the selection changes.

ecc-input-changed

This event is fired when the user selects or deselects options.

<EccUtilsDesignMultiSelect 
  onEccInputChanged={(event) => {
    console.log('Selected values:', event.detail.value);
  }}
>
  ...
</EccUtilsDesignMultiSelect>
Elixir Cloud & AAICloud SDKElixir

Released under Apache 2.0 License.

Copyright © 2023-2025 ELIXIR