Select

A fully accessible single-select dropdown built on Radix UI Select. Handles positioning, keyboard navigation, search, and ARIA attributes automatically.

Built on Radix UI.

  • Keyboard navigable — Arrow keys, Home, End, type-to-search
  • Portal-based dropdown — renders outside the DOM flow
  • Scroll buttons when content overflows
  • Groups with labels via SelectGroup + SelectLabel
  • Separator support via SelectSeparator
  • Controlled and uncontrolled

import { Select }from "@aetherstack/ui"

select.tsx
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select"

export function SelectDemo() {
  return (
    <Select>
      <SelectTrigger className="w-48">
        <SelectValue placeholder="Select a framework" />
      </SelectTrigger>
      <SelectContent>
        <SelectItem value="next">Next.js</SelectItem>
        <SelectItem value="remix">Remix</SelectItem>
        <SelectItem value="vite">Vite</SelectItem>
        <SelectItem value="astro">Astro</SelectItem>
      </SelectContent>
    </Select>
  )
}

Usage

With label

Framework

Grouped options

Use SelectGroup and SelectLabel to group related options.

Controlled

Disabled items

Props

PropTypeDefaultDescription

Select (Root)

PropTypeDefaultDescription
valuestringControlled selected value.
defaultValuestringUncontrolled initial value.
onValueChange(value: string) => voidCallback when selection changes.
disabledbooleanfalseDisables the entire select.
openbooleanControlled open state.
onOpenChange(open: boolean) => voidCallback when open state changes.

SelectTrigger

PropTypeDefaultDescription
classNamestringUse w-* to control width. Defaults to w-full.

SelectItem

PropTypeDefaultDescription
value*stringThe item value.
disabledbooleanfalseDisables this specific item.

SelectContent

PropTypeDefaultDescription
position"popper" | "item-aligned""popper"Positioning strategy.
side"top" | "right" | "bottom" | "left""bottom"Preferred side to open.
sideOffsetnumber4Distance from trigger in px.

* Required props

Accessibility

  • Uses the combobox ARIA pattern — trigger has role='combobox', options have role='option'.
  • Type characters to jump to matching options.
  • Arrow keys navigate options. Enter or Space selects. Escape closes.
  • Always associate with a Label via htmlFor on the SelectTrigger id.