shadcn.io is an independent project built on shadcn/ui
Department sits above the menu. The menu says Choose department until someone picks. The list is Engineering, Design, Marketing, Sales, Customer Support, and Human Resources. Under it: Select your department or area of work.
It fits a short note that should stay after a choice. If the list should stay open, use a Listbox. In React, Base UI does not assign the department.
Installation
Anatomy

Usage
<Field className="max-w-md">
<FieldLabel htmlFor="work-department">Department</FieldLabel>
<Select items={departments}>
<SelectTrigger className="w-full" id="work-department">
<SelectValue placeholder="Choose department" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{departments.map((item) => (
<SelectItem key={item.value} value={item.value}>
{item.label}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
<FieldDescription>Select your department or area of work.</FieldDescription>
</Field>FAQ
Where does the helper text sit?
The order is FieldLabel, Select, then FieldDescription. The description reads Select your department or area of work.
What shows before a department is chosen?
The placeholder Choose department shows until an item is selected. It's the placeholder on SelectValue.
Which departments are in the list?
The items are Engineering, Design, Marketing, Sales, Customer Support, and Human Resources, each a SelectItem.
How does the Department label connect?
FieldLabel names the select. Its htmlFor matches the SelectTrigger's id. The label text is Department.
API Reference
Field
Sets htmlFor="work-department". The rest is on the Field page.
Select
Sets items={departments}, id="work-department", placeholder="Choose department" and value={item.value}. The rest is on the Select page.





