Pilipinas Interface

Foundation

  • Overview
  • Get Started
  • Colors
  • Typography
  • Icons
  • Layout & Spacing
  • States & Feedback
  • Motion & Transitions
  • Expressions

Components

  • Overview
  • Accordion
  • Alert
  • Avatar
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Card
  • Checkbox
  • Code Block
  • Combobox
  • Command Menu
  • Dialog
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Text Field
  • Tooltip

Resources

  • Registry

Components

Select

A closed set of choices with one visible value. The trigger stays compact; the list opens in place with typeahead and keyboard navigation.

Preview

value: ncr

<Select value={value} onValueChange={setValue}>
  <SelectTrigger placeholder="Choose a region" />
  <SelectContent>
    <SelectItem index={0} value="ncr">National Capital Region</SelectItem>
  </SelectContent>
</Select>

Usage

A closed set where one value stays visible on the trigger.

Do and don't

  • Do. Label it with FieldLabel and keep option values stable.
  • Don't. Use it when the set is large enough to need search.

Composition

Select owns the value and popup. SelectTrigger is the button, SelectContent holds the list, and SelectItem is each option. SelectGroup, SelectLabel and SelectSeparator organize longer lists.

Props

  • Select: value, defaultValue, onValueChange, disabled, name, required, size.
  • SelectTrigger: placeholder, icon, error, size.
  • SelectItem: index (its position in the list), value, disabled, icon.

Behavior and states

The selected row holds the popup briefly so the checkmark can draw before it closes. Escape and outside presses still close immediately. The list flips on collision, supports typeahead and keeps a hidden form input so the value submits with a form. Disabled items stay visible but cannot be chosen.

Accessibility

Base UI owns the combobox roles, list navigation and typeahead. Give the control a real label with FieldLabel; a placeholder is not a label. Pass validation text to FieldError and link it through Field. The trigger is a native button, so Enter and Space open it and focus returns after a pick.

Responsive

The popup tracks the trigger and flips when space is tight. Set size on the root so the trigger and list share the 36px or 28px step; omit it to follow the surrounding size context.

Related

Text Field provides the label and error wiring, Radio Group keeps all options visible, and Combobox adds search.

← PreviousScroll AreaNext →Skeleton

Install

npx shadcn@latest add @pilipinas/select

For your coding agent