Prodular UI

Inputs

Select

Choose one option from a short list in a popup, styled to match the rest of the form.

npx prodular-ui add select

With a field

New teammates join with this role.

Groups and icons

Group long lists with SelectLabel and a separator.

Sizes

Anatomy

<Select items={roles} defaultValue="member">  <SelectTrigger className="w-full">    <SelectValue />  </SelectTrigger>  <SelectContent>    <SelectItem value="member">Member</SelectItem>  </SelectContent></Select>

Guidance

Use it when

  • Five to fifteen known options where only one can apply: role, timezone, status, date range.

Avoid

  • Two or three options that people should compare. Use RadioGroup.
  • Long or searchable lists such as people or countries. Use Combobox.
  • Mobile-first forms where the system picker is better. Use NativeSelect.

Rules for AI agents

Published in llms-full.txt and the registry, so coding agents follow them when they build with this component.

  • Pass the options to Select as items={[{ label, value }]} so SelectValue shows the label, not the raw value.
  • Use SelectValue placeholder for the empty state. Do not add a fake first option.
  • Give the trigger a width (w-full inside forms, a fixed width in toolbars) so it does not jump when the value changes.
  • Inside Field the label is linked automatically. Outside Field, add aria-label to SelectTrigger.
  • Match SelectTrigger size to nearby Buttons and Inputs.
  • Use size="xs" on SelectTrigger for dense toolbars and inspectors instead of overriding its height.

API

Select

PropTypeDefaultDescription
items{ label: ReactNode; value: unknown }[]Options used to render the selected label.
value / defaultValueunknownControlled or initial value.
onValueChange(value) => voidCalled when the selection changes.

SelectTrigger

PropTypeDefaultDescription
size"xs" | "sm" | "default" | "lg""default"Height. Matches Button and Input.

SelectContent

PropTypeDefaultDescription
alignItemWithTriggerbooleantrueOverlays the selected item on the trigger. Set false to open below it.