Select Field
A labeled select with description, popup options, and helper or error text.
Show codeHide code
Installation
import { SelectField } from "@makeplane/propel/components/select-field";Usage
import { SelectField } from "@makeplane/propel/components/select-field";
const ROLES = [
{ label: "Admin", value: "admin" },
{ label: "Member", value: "member" },
{ label: "Guest", value: "guest" },
];
export default function BasicDemo() {
return (
<SelectField
name="role"
label="Member role"
description="Choose the default role for new members."
size="lg"
options={ROLES}
defaultValue="member"
hint="You can change this later."
/>
);
}Examples
Sizes
For the default secondary and ghost variants, size runs md, lg, xl, and 2xl, stepping
the label, helper text, and trigger together. The popup’s option rows stay a fixed size regardless,
matching the Figma spec.
Show codeHide code
Ghost
Passing variant="ghost" drops the trigger’s border and fill for a select that sits directly on its parent surface.
Show codeHide code
Trigger width
width="auto" is the default and preserves the existing 288px minimum. Set width="fit" to make
a secondary or ghost trigger hug its icon, value, chevron, gaps, and padding. Popup sizing stays
independent, so a longer option can still make the default anchor-sized popup wider than the
trigger. Pill remains intrinsically sized and does not accept this prop.
Show codeHide code
Pill
Passing variant="pill" makes the trigger hug its value for compact property and filter selectors.
It follows Propel Pill anatomy and does not add a chevron. SelectField automatically gives its
popup content-based sizing so the options remain readable. Pill accepts xs, sm, and md; its
surrounding label and helper copy stay on the field’s md typography rung.
Show codeHide code
With icon
icon shows a leading glyph before the value, forwarded to the trigger’s Icon slot.
Show codeHide code
Disabled
Show codeHide code
Invalid
Passing error marks the field invalid and replaces the helper text with the error message.
Show codeHide code
Controlled
Show codeHide code
Multiple
Pass multiple with an array value to select more than one option. The trigger joins the selected
option labels, restores the placeholder when the selection is empty, and each option row uses a
leading checkbox marker.
Show codeHide code
Placeholder
Without a defaultValue, the trigger shows placeholder until an option is picked.
Show codeHide code
Rich options
An option takes any SelectItem prop: icon, description, secondaryText, trailing,
disabled, and whatever SelectItem gains later. footer (and header) pin sticky content around
the list, and sizing="auto" sizes the popup to its options instead of the trigger.
Show codeHide code
Grouped
An entry with its own options is a group: it renders under its label heading, with an optional
meta pinned at the heading’s end. Each group also takes a key, which must be unique within the
field’s options. Plain options and groups can be mixed. A "separator" entry
draws a divider exactly where it sits (nothing is added automatically), so you choose which groups
or options get one. Here the Americas and Europe groups share a divider-free block. A group with no
options, a separator at either end of the list, or one right after another is skipped.
Show codeHide code
Object values
The field takes its value type (SelectField<Assignee>), so options can carry objects.
itemToStringValue turns the selected object into the string the form submits.
Show codeHide code
API Reference
SelectField
Ready-to-use select field with label, trigger, popup options, and helper/error text.