VESYL UI

Select

A rich dropdown for picking a single option from a list. Built on base-ui Select — it renders a portaled, fully styleable popup, so items can carry icons, descriptions, groups, and separators that a native <select> can’t.

Reach for this over NativeSelect when you need custom-rendered options or a consistent look across platforms; the NativeSelect is lighter and better for plain text options or mobile-first forms. Reach for Combobox instead when the list is long enough to need type-ahead filtering — Select has no search input. Long lists scroll inside a ScrollArea with edge hints.

Compose the parts: Select (root, owns the value), SelectTrigger (the button), SelectValue (renders the current selection or placeholder), SelectContent (the popup), SelectItem (one option), and SelectGroup + SelectLabel + SelectSeparator for sectioning.

Basic

A trigger, a value, and a flat list of items. Give SelectValue a placeholder for the empty state, and seed an initial selection with defaultValue on the root.

Grouped options

Wrap related items in SelectGroup, head each group with a SelectLabel, and divide groups with SelectSeparator. Useful for sectioned lists like warehouses by region.

Dense

size="sm" on the root tightens the trigger and the popup list together — group labels hug the first row, items use the same inset as Combobox sm. The popup still uses ScrollArea when the list overflows.

Disabled items

Mark an individual option unselectable with disabled on the SelectItem — it dims and skips keyboard focus while the rest of the list stays usable.

Controlled

Select is uncontrolled by default — pass defaultValue. To drive it yourself, pass value and onValueChange. When you control it, give SelectValue an items array ({ value, label }) so the trigger shows the option’s label instead of its raw value.

Current status: pending

Reference

Select

Root container. Extends base-ui Select.Root props.

PropTypeDefaultDescription
defaultValueanyInitially selected value (uncontrolled)
valueanySelected value (controlled)
onValueChange(value) => voidFires when the selection changes
disabledbooleanfalseDisables the whole control
namestringField name when used inside a form
size"md" | "sm""md"Trigger height and popup list density

SelectTrigger

The button that opens the popup. Extends base-ui Select.Trigger props.

PropTypeDefaultDescription
size"md" | "sm""md"Trigger height. Inherited from Select when omitted.
classNamestringMerged onto the trigger

SelectTriggerButton is an alternative trigger that renders through the Button component (defaults to variant="ghost", size="sm") — use it when the trigger should blend into a toolbar or card header instead of looking like a bordered input.

SelectValue

Renders the current selection inside the trigger. Extends base-ui Select.Value props.

PropTypeDefaultDescription
placeholderstringShown when nothing is selected
itemsReadonlyArray<{ value, label }>Look-up table so the trigger shows a label, not the raw value
children(value) => ReactNodeCustom render function (alternative to items/placeholder)

SelectContent

The portaled popup. Extends base-ui Select.Popup plus positioning props.

PropTypeDefaultDescription
side"top" | "right" | "bottom" | "left""bottom"Side of the trigger to open on
sideOffsetnumber4Gap between trigger and popup
align"start" | "center" | "end""center"Alignment along the trigger edge
alignOffsetnumber0Offset along the alignment axis
alignItemWithTriggerbooleanfalseAnchor the selected item over the trigger
size"md" | "sm"inheritedPopup list density. Inherited from Select.

SelectItem

A single option. Extends base-ui Select.Item props.

PropTypeDefaultDescription
valueanyThe value selecting this item sets
disabledbooleanfalsePrevents selection and keyboard focus

SelectGroup

Groups a set of items. Extends base-ui Select.Group props.

SelectLabel

A heading for a group. Extends base-ui Select.GroupLabel props.

SelectSeparator

A horizontal divider between groups. Extends base-ui Select.Separator props.