Documentation
Design
Components
Select

EccUtilsDesignSelect Component

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

Overview

The ecc-utils-design-select component provides a flexible and accessible dropdown menu for selecting a value from a set of options. It's a compound component, giving you full control over its structure and behavior.

This component is composed of several parts that work together, including a trigger, content area, items, labels, and separators.

Usage

Basic Select

This example shows a basic select with a few options.

AppleBananaBlueberry

Select with Groups

This example shows how to group options using labels and separators.

North AmericaEastern Standard Time (EST)Pacific Standard Time (PST)EuropeGreenwich Mean Time (GMT)Central European Time (CET)

Components

The Select is built by combining these components:

ComponentTag NameDescription
Selectecc-utils-design-selectThe root container for the select.
SelectValueecc-utils-design-select-valueDisplays the selected value or a placeholder.
SelectTriggerecc-utils-design-select-triggerThe button that opens the select dropdown.
SelectContentecc-utils-design-select-contentThe container for the select options.
SelectGroupecc-utils-design-select-groupA container for grouping options.
SelectLabelecc-utils-design-select-labelA title for a group of options.
SelectItemecc-utils-design-select-itemA single option in the select dropdown.
SelectSeparatorecc-utils-design-select-separatorA visual separator between groups.

Properties

EccUtilsDesignSelect

PropertyTypeDefaultDescription
valuestring""The value of the currently selected option.
disabledbooleanfalseWhen true, disables the select.

value

Controls the currently selected option. Should match the value of one of the SelectItem components.

<EccUtilsDesignSelect value="apple">
  ...
</EccUtilsDesignSelect>

disabled

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

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

EccUtilsDesignSelectItem

PropertyTypeDefaultDescription
valuestring""The unique value for this option.
disabledbooleanfalseWhen true, this option cannot be selected.

value

A unique identifier for the option. This value is used when the item is selected.

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

disabled

When true, prevents the option from being selected and visually indicates it's unavailable.

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

EccUtilsDesignSelectValue

PropertyTypeDefaultDescription
placeholderstring"Select an option"Text to display when no value is selected.

placeholder

Text displayed when no option is selected, providing guidance to users.

<EccUtilsDesignSelectValue placeholder="Choose a fruit..." />

Events

EccUtilsDesignSelect

Event NameReact Event NameDetail TypeDescription
ecc-input-changedonEccInputChanged{ value: string }Fired when an option is selected.

ecc-input-changed

This event is fired when the user selects a new option from the dropdown.

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

Released under Apache 2.0 License.

Copyright © 2023-2025 ELIXIR