Primitive Adaptersregistry/ui/select.tsx/r/select.json

Select

Accessible listbox selector adapter with linked label, marker-yellow ▼ caret, and ink-inverted active item.

Light · Paper.f12-theme-light
Interactive preview
Dark · Flashback.f12-theme-dark
Interactive preview

Install & copy-in source

shadcn CLI (select.json)
npx shadcn@latest add https://frame12.dev/r/select.json
Usage example (Select)
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/frame12';

export function ChannelSelect() {
  return (
    <Select defaultValue="cart" label="Intervention channel">
      <SelectTrigger><SelectValue /></SelectTrigger>
      <SelectContent>
        <SelectItem value="cart">Abandoned-cart email</SelectItem>
        <SelectItem value="exit">Exit-intent offer</SelectItem>
        <SelectItem value="stock">Back-in-stock alert</SelectItem>
      </SelectContent>
    </Select>
  );
}
WCAG AAAccessibility guarantees

Accessibility notes

  • Exposes aria-haspopup="listbox", aria-expanded, and role="listbox" with aria-selected on options.
  • Dismisses on Escape or outside pointer down.
GrammarFRAME/12 rules

Design grammar

  • Uses a marker-yellow ▼ caret badge and a ✓ marker check on the selected option.

Props & TypeScript API

Exported from @/components/frame12 (registry/ui/select.tsx)
PropTypeDefaultDescription
value / defaultValuestring''Controlled or uncontrolled selected item value.
onValueChange(value: string) => voidundefinedCallback fired when an option is selected.
labelstringundefinedOptional visible <label> automatically linked to the trigger button.