byronwade/ui
Application UI

Forms · Application UI

Select

An accessible dropdown select built on Base UI's Select primitive, composed of compound parts (trigger, content, items, groups, labels, separators) with animated popover positioning and keyboard navigation.

Feature showcase

Installation

Features

  • 7 examples

    Default, Controlled, Disabled, Grouped, Sizes, With Error, With Icon.

API

Props

PropTypeDefaultDescription
size"sm" | "default""default"Controls the height of the trigger button (h-7 for sm, h-8 for default).
side"top" | "bottom" | "left" | "right" | "inline-start" | "inline-end""bottom"Which side of the trigger the dropdown content opens on (passed to SelectContent).
sideOffsetnumber4Gap in pixels between the trigger and the dropdown content (passed to SelectContent).
align"start" | "center" | "end""center"Alignment of the dropdown content relative to the trigger (passed to SelectContent).
alignOffsetnumber0Pixel offset applied along the alignment axis (passed to SelectContent).
alignItemWithTriggerbooleantrueWhen true, the selected item inside the popup aligns with the trigger position (passed to SelectContent).

Source and related

FilePath
Componentregistry/ui/select.tsx
Default examplecontent/examples/select/default.tsx
Controlled examplecontent/examples/select/controlled.tsx
Disabled examplecontent/examples/select/disabled.tsx
Grouped examplecontent/examples/select/grouped.tsx
Sizes examplecontent/examples/select/sizes.tsx
With Error examplecontent/examples/select/with-error.tsx
With Icon examplecontent/examples/select/with-icon.tsx