Skip to content
Eskais UI

Forms

Select

UI SDK Select: trigger, popup list, items with a check indicator, groups and separators, or `options` as data with a clearable none choice. Works inside Field; agents choose by label.

Example

Installation

npx shadcn@latest add @eskais/select
Brings alongnarrowfieldinput
npm packageslucide-react

Usage

Import
import {  CheckIcon,  ChevronIcon,  Select,  SelectContent,  SelectGroup,  SelectGroupLabel,  SelectItem,  SelectItemIndicator,  SelectLabel,  SelectList,  SelectSeparator,  SelectTrigger,  SelectValue,  createSelectController,  listGroupLabelClassName,  listIndicatorClassName,  listItemClassName,  listPopupClassName,  listSeparatorClassName,  selectTriggerVariants,} from "@/components/ui/select"

API reference

SelectTrigger

PropTypeDefault
size"default" | "sm""default"

Also takes every prop of UI SDK SelectTrigger.

Select

Takes SelectProps<T, Multiple>.

Other exports

CheckIconChevronIconSelectGroupSelectListcreateSelectControllerlistGroupLabelClassNamelistIndicatorClassNamelistItemClassNamelistPopupClassNamelistSeparatorClassNameselectTriggerVariantstype ListDatatype SelectControllertype SelectItemStatetype SelectOptiontype SelectOptionGrouptype SelectOptionstype SelectPropstype SelectSizetype SelectTriggerProps

Accessibility

  • A listbox popup with typeahead, arrow keys and Home/End; the trigger shows the selected label.
  • Outside a Field, name it with aria-label.

Agent actions

Agents choose by value or by label; options are known before the list opens.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.