Select Input
Commonly used select input component.
Installation
npx wdc add selectSingle Selection Examples
Basic Usage
Select from a simple array of strings.
Binding Objects
Bind to object properties using bindLabel and bindValue.
Binding directly to a WritableSignal
Signal Value: IN
States
Error, success, and disabled states.
Multiple Selection Examples
Basic Usage
Select multiple strings from a list.
Select skills...
Object Binding
Select multiple objects by binding ID.
Add members...
Validation States
Consistent error styling with single select and inputs.
Select items...
Manager
API Reference
| Input | Type | Default | Description |
|---|---|---|---|
| options | any[] | required | Array of items to display in the dropdown. |
| bindLabel | string | 'label' | Property name to display as the label (e.g., "name"). |
| bindValue | string | 'value' | Property name to use as the value (e.g., "id"). |
| searchable | boolean | true | Enables a search input inside the dropdown. |
| label | string | '' | Label displayed above the select trigger. |
| placeholder | string | 'Select an option' | Placeholder text when no value is selected. |
check_circle
SEO & Accessibility
The select component uses a button trigger with aria-expanded and a proper label. While custom select menus are harder for crawlers than native , this implementation follows accessibility guidelines (WAI-ARIA) ensuring screen readers can announce the label and state correctly.