Skip to content

Select

Select

<Select label="Country" defaultSelectedKey="kr">
<Option id="kr">Korea</Option>
<Option id="jp">Japan</Option>
<Option id="us">United States</Option>
</Select>

Install: @helixui/core

import { Select, Option } from '@helixui/core'

status: stable · since: 0.1.0

Tags: picker, dropdown, single-value

Anatomy

[ Selected value ▾ ]
╭──── popover ───╮
│ • Option A │
│ • Option B ✓ │
│ • Option C │
╰────────────────╯

Layout

  • displayblock
  • widthfill
  • heightcontent
  • intrinsicSizefills width, hugs height
  • stackablefalse
  • fullBleedfalse

Visual

A trigger button styled like a TextInput with a trailing chevron. On open, a popover listbox appears anchored to the trigger; selected option is checkmarked.

Props

NameTypeDefaultDescription
labelReactNodeVisible label.
descriptionReactNodeHelper text.
errorMessagestring | (v: ValidationResult) => stringError text.
placeholderstringSelect…Shown when nothing is selected.
size'sm' | 'md' | 'lg'mdTrigger height.
selectedKeyKey | nullControlled selected option.
defaultSelectedKeyKeyUncontrolled initial.
onSelectionChange(key: Key) => voidSelection change handler.

Slots

  • children — Option components

Tokens used

color.bg.surface.default, color.bg.action.neutral.default, color.bg.action.brand.subtle, color.border.default, color.border.focus, color.text.primary, color.text.secondary, color.text.muted, color.text.action.brand, color.text.action.danger, radius.md, space.1, space.2, space.3, font.family.sans, font.size.sm, font.size.md, font.size.lg, font.weight.medium, shadow.md

Accessibility

Role: combobox

Keyboard

KeyAction
ArrowDownOpen / move down.
EnterSelect highlighted option.
EscapeClose.

Composes with

ComponentRelationNote
FieldwrapsBuilt-in label/description/error.
FormparentSubmitted as part of a Form.
MultiSelectalternativeMultiSelect for multiple values.

Prompt examples

These are the AI prompt → JSX mappings used by the helixui prompt DSL and integrations like Cursor / Claude Code.

country picker

“select with three options”

<Select label="Country" value={country} onChange={setCountry}>
<Option value="us">United States</Option>
<Option value="kr">Korea</Option>
<Option value="jp">Japan</Option>
</Select>