Combobox Field
A labeled multi-select combobox with title and description above a closed trigger, an overlay panel of searchable checkbox items, and helper or error text below.
Show codeHide code
Installation
import { ComboboxField } from "@makeplane/propel/components/combobox-field";Usage
import { ComboboxField } from "@makeplane/propel/components/combobox-field";
import { Icon } from "@makeplane/propel/components/icon";
import { AddOutline } from "@makeplane/propel/icons";
const REGIONS = ["us-central-1", "us-east-1", "eu-central-1", "ap-west-1"];
export default function BasicDemo() {
return (
<ComboboxField
name="region"
label="Region"
description="Filter the deployment region."
hint="Helper text"
required
size="lg"
items={REGIONS}
placeholder="Select label"
empty="No regions found"
icon={<Icon icon={AddOutline} tint="placeholder" />}
/>
);
}Options and selection
Pass primitive options directly, or records with both getItemValue and getItemLabel
(required for non-primitive items). value and onValueChange use unique string/number IDs;
filter receives the original options. Prefer stable accessor references for large lists.
The field picks one value by default: value is a single ID (or null), rows show a check, and the
popup closes on pick. Pass multiple to pick several — see Multiple selection.
Large lists and server results
Rows are virtualized by default: the popup stays trigger-width and long labels truncate (full text
as a tooltip). virtualized={false} mounts every option and sizes the popup to its content. For
huge catalogs, supply externally filtered results through filteredItems; virtualization bounds
rendering, not local search cost. Fetching and pagination remain application-owned. Use
inputValue and onInputValueChange to control the search query.
Keep known records in items and offered results in filteredItems. For off-page selection labels,
retain those records in items or supply itemToStringLabel(id); otherwise the ID is displayed.
The field does not retain previous results. With multiple, Select all affects filteredItems when
provided (including an empty array), otherwise all items, and preserves selections outside that
list.
Examples
Multiple selection
multiple picks several values: value and onValueChange use an array of IDs, rows show a
checkbox, and a sticky Select all row selects or clears every option. The trigger previews three
labels plus a +N more count (or N selected when maxVisible={0}). Set maxVisible to change the
preview, overflowLabel to localize the count, and selectAllLabel to rename the row.
Show codeHide code
Record options
Selection is ID-based. Supply getItemValue / getItemLabel so labels can repeat while IDs stay unique.
Show codeHide code
Rich options
getItemProps passes extra ComboboxItem props to each option’s row: a leading icon, a
trailing count, disabled, and so on. The field still sets each row’s value, label and checkbox
itself. footer pins content under the list.
Show codeHide code
Sizes
size steps the label, description, and helper text together with the trigger’s own scale.
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 rendered content. To keep the search panel usable,
ComboboxField gives a fit trigger content-based popup sizing by default: auto-fixed while the
list is virtualized and auto otherwise. An explicit sizing prop still takes precedence. Pill
remains intrinsically sized and does not accept width.
Show codeHide code
Pill
Passing variant="pill" makes the trigger hug its selection for compact filter pickers, like
SelectField’s pill. It follows Propel Pill anatomy and does not add a chevron. The popup gets
content-based sizing so the options stay readable. Pill accepts xs, sm, and md; the label and
helper text stay on the field’s md typography rung.
Show codeHide code
Invalid
Setting error marks the field invalid, recoloring the trigger border. The error replaces helper text below the control; the description above the control stays.
Show codeHide code
Disabled
Show codeHide code
API Reference
ComboboxField
Ready-to-use combobox field: a closed trigger, overlay search, option rows, and helper/error
text. Picks one value by default; multiple picks several, with checkbox rows and Select all.
Record options require getItemValue and getItemLabel. Primitive string/number options use
themselves as IDs when those accessors are omitted. For large lists, keep accessors and
itemToStringLabel referentially stable; supply a new items array when what they return for an
item changes.