Select
Dropdown select input
UI PrimitiveForm Inputs
Overview
A compound component built on Radix UI's Select primitive. Supports two trigger sizes, item grouping, and scroll buttons for long lists. Exports both compound (Select.Trigger) and individual named exports.
Usage
import { Select } from "@leanicon/web-builder-library";
<Select>
<Select.Trigger className="w-48">
<Select.Value placeholder="Choose a fruit" />
</Select.Trigger>
<Select.Content>
<Select.Group>
<Select.Label>Fruits</Select.Label>
<Select.Item value="apple">Apple</Select.Item>
<Select.Item value="banana">Banana</Select.Item>
</Select.Group>
<Select.Separator />
<Select.Item value="other">Other</Select.Item>
</Select.Content>
</Select>;With groups
Simple
With default value
Small trigger
Disabled
Notes
- Controlled: pass
valueandonValueChangeto the rootSelect. Select.Triggerwidth defaults tow-fit; set an explicit width for full-width dropdowns.Select.Triggersupportssize="sm"for compact layouts.- Dark mode is handled via semantic tokens.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
value | string | — | No | |
defaultValue | string | — | No | |
onValueChange | ((value: string) => void) | — | No | |
asChild | boolean | — | No | |
size | enum | default | No |