Select
Lets a user choose one option from a list in a popup.
Show codeHide code
Installation
import {
Select,
SelectContent,
SelectItem,
SelectLabel,
SelectList,
SelectTrigger,
} from "@makeplane/propel/components/select";Usage
import {
Select,
SelectContent,
SelectField,
SelectItem,
SelectLabel,
SelectList,
SelectTrigger,
} from "@makeplane/propel/components/select";
const SERVER_TYPES = [
{ label: "General purpose", value: "general" },
{ label: "Compute optimized", value: "compute" },
{ label: "Memory optimized", value: "memory" },
];
export default function BasicDemo() {
return (
<Select items={SERVER_TYPES} defaultValue="general">
<SelectField>
<SelectLabel size="lg">Server type</SelectLabel>
<SelectTrigger size="lg" />
</SelectField>
<SelectContent>
<SelectList>
{SERVER_TYPES.map(({ label, value }) => (
<SelectItem key={value} value={value} size="lg" label={label} />
))}
</SelectList>
</SelectContent>
</Select>
);
}Examples
Placeholder
Without a defaultValue, the trigger shows its placeholder until an option is picked.
Show codeHide code
Multiple
Show codeHide code
Grouped
Show codeHide code
Sizes
size runs lg 32 / xl 36 / 2xl 40 px. Pass the same value to SelectLabel,
SelectTrigger, and each SelectItem: the label and the option rows both track the trigger’s
rung. The label runs 13px at lg, 14px at xl and 2xl — matching what a field wrapper
renders at the same control height, so it sits one step calmer than the value at lg and
2xl and matches it at xl. See Sizing for the full ladder.
Show codeHide code
Variants
SelectTrigger’s secondary variant (default) is the bordered surface; ghost drops the border and fill for a trigger that sits directly on its parent surface.
Show codeHide code
With icon
SelectTrigger’s icon prop shows a leading glyph before the value, via the shared Icon slot.
Show codeHide code
API Reference
Select
The select Root — Base UI's context/state provider (renders no element of its own). A behavior-only role, so it lives in `components` (rules 1a, 2); the styled parts live in `elements/select` and are grafted onto Base UI behavior here.
SelectTrigger
The ready-made select trigger: grafts Base UI's `Select.Trigger` behavior onto the styled trigger and bakes its anatomy — an optional leading icon, the selected value (Base UI's `Select.Value` grafted onto `SelectValue`), and the owned chevron indicator. Children are baked, so the prop is omitted.
SelectContent
The select list surface: Base UI portal + positioner + popup grafted onto Propel styling.
SelectItem
The ready-made select option row: grafts Base UI's `Select.Item` behavior onto the shared listbox row and bakes the selection marker — Base UI's `Select.ItemIndicator` grafted onto the styled `SelectItemIndicator` with a check glyph. The marker is `keepMounted` because the `layout="indicator"` row places children positionally: it must occupy the leading column even while unselected (the styled marker hides its glyph off `data-selected`). The `label` prop becomes the item's text via Base UI's `Select.ItemText`.