Skip to main content

Combobox

Shared, editable XML components from the combobox family.

Usage​

Declare the catalog namespace in your screen and run relo-components build to bundle its dependencies before delivery. Install Components host support before session creation. Use ui:Theme or your compatible theme.

<ui:Theme xmlns:ui="urn:relo:registry:relo">
<ui:Combobox />
</ui:Theme>

Dependencies: command, input, theme.

Exports​

ui:Combobox · ui:ComboboxChip · ui:ComboboxChips · ui:ComboboxChipsInput · ui:ComboboxCollection · ui:ComboboxContent · ui:ComboboxEmpty · ui:ComboboxGroup · ui:ComboboxInput · ui:ComboboxItem · ui:ComboboxLabel · ui:ComboboxList · ui:ComboboxSeparator · ui:ComboboxTrigger · ui:ComboboxValue

ui:Combobox​

PropDefaultRequired
valuenullNo
valueLabelnullNo
items[]No
label'Choose'No
placeholder'Select an option'No
enabledtrueNo

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

  • on-change — explicitly emitted output; inspect the definition for payload shape.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="Combobox" props="value=null, valueLabel=null, items=[], label='Choose', placeholder='Select an option', enabled=true" xmlns:ui="urn:relo:registry:relo">
<Column state="{open:false, chosen:{id:props.value,label:props.valueLabel}}" class="gap-1">
<Pressable ref="trigger" bind-label="props.label" bind-enabled="props.enabled" bind-expanded="open" class="transition spring-fast rc-button-outline px-3 h-8" on-press="set open to not open">
<Row class="h-full flex-1 items-center justify-between gap-2">
<Text if="chosen.id == props.value and chosen.label != null" bind-text="chosen.label" class="font-rc-small" />
<Text if="(chosen.id != props.value or chosen.label == null) and (props.valueLabel != null or props.value == null or props.items == [])" bind-text="props.valueLabel ?? props.placeholder" class="font-rc-small text-rc-muted-foreground" />
<For each="option" in="props.items" key="option.id">
<Text if="option.id == props.value and props.valueLabel == null and (chosen.id != props.value or chosen.label == null)" bind-text="option.label" class="font-rc-small" />
</For>
<ui:IconChevronsUpDown class="w-4 h-4" />
</Row>
</Pressable>
<Popup mode="anchored" anchor="trigger" model="open" bind-label="props.label" class=" enter:opacity-0 exit:opacity-0 enter:scale-95 exit:scale-95 spring-fast">
<ui:Command bind-value="props.value" bind-items="props.items" bind-label="props.label" bind-searchable="true" on-change="emit change with event; set open to false" on-selected="set chosen to {id:event.value,label:event.label}" />
</Popup>
</Column>
</Component>

Read Combobox source.

ui:ComboboxChip​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxChip">
<Row class="gap-1 items-center">
<Slot />
</Row>
</Component>

Read ComboboxChip source.

ui:ComboboxChips​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxChips">
<Row class="gap-1 items-center">
<Slot />
</Row>
</Component>

Read ComboboxChips source.

ui:ComboboxChipsInput​

PropDefaultRequired
value''No
label''No
placeholder''No
enabledtrueNo

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

  • on-change — explicitly emitted output; inspect the definition for payload shape.
  • on-submit — explicitly emitted output; inspect the definition for payload shape.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="ComboboxChipsInput" props="value='', label='', placeholder='', enabled=true" xmlns:ui="urn:relo:registry:relo">
<ui:Input bind-value="props.value" bind-label="props.label" bind-placeholder="props.placeholder" bind-enabled="props.enabled" on-change="emit change with event" on-submit="emit submit with event" />
</Component>

Read ComboboxChipsInput source.

ui:ComboboxCollection​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxCollection">
<Row class="gap-1 items-center">
<Slot />
</Row>
</Component>

Read ComboboxCollection source.

ui:ComboboxContent​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxContent">
<Column class="gap-1">
<Slot />
</Column>
</Component>

Read ComboboxContent source.

ui:ComboboxEmpty​

PropDefaultRequired
text''No

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="ComboboxEmpty" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground p-4 text-center" />
</Component>

Read ComboboxEmpty source.

ui:ComboboxGroup​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxGroup">
<Column class="gap-1">
<Slot />
</Column>
</Component>

Read ComboboxGroup source.

ui:ComboboxInput​

PropDefaultRequired
value''No
label''No
placeholder''No
enabledtrueNo

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

  • on-change — explicitly emitted output; inspect the definition for payload shape.
  • on-submit — explicitly emitted output; inspect the definition for payload shape.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="ComboboxInput" props="value='', label='', placeholder='', enabled=true" xmlns:ui="urn:relo:registry:relo">
<ui:Input bind-value="props.value" bind-label="props.label" bind-placeholder="props.placeholder" bind-enabled="props.enabled" on-change="emit change with event" on-submit="emit submit with event" />
</Component>

Read ComboboxInput source.

ui:ComboboxItem​

PropDefaultRequired
label''No
variant'default'No
size'default'No
enabledtrueNo

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Mapped size choices: default, icon, iconLg, iconSm, iconXs, lg, sm, xs.

Mapped variant choices: default, destructive, ghost, link, outline, secondary.

Events​

  • on-press — explicitly emitted output; inspect the definition for payload shape.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxItem" props="label='', variant='default', size='default', enabled=true">
<Pressable bind-label="props.label" bind-enabled="props.enabled" role="button" bind-class="'transition spring-fast ' + ({default: 'rc-button-default', secondary: 'rc-button-secondary', outline: 'rc-button-outline', ghost: 'rc-button-ghost', destructive: 'rc-button-destructive', link: 'rc-button-link'}[props.variant] + ' ' + {default: 'h-8 px-2.5', xs: 'h-6 px-2', sm: 'h-7 px-2.5', lg: 'h-9 px-2.5', icon: 'w-8 h-8 p-2', iconXs: 'w-6 h-6 p-1', iconSm: 'w-7 h-7 p-1.5', iconLg: 'w-9 h-9 p-2'}[props.size])" on-press="emit press with event">
<Row class="h-full flex-1 items-center justify-center gap-2">
<Slot>
<Text bind-text="props.label" class="font-rc-small font-medium" />
</Slot>
</Row>
</Pressable>
</Component>

Read ComboboxItem source.

ui:ComboboxLabel​

PropDefaultRequired
text''No

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="ComboboxLabel" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>

Read ComboboxLabel source.

ui:ComboboxList​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxList">
<Column class="gap-1">
<Slot />
</Column>
</Component>

Read ComboboxList source.

ui:ComboboxSeparator​

PropDefaultRequired
—No declared user props—

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="ComboboxSeparator">
<Divider class="bg-rc-border" />
</Component>

Read ComboboxSeparator source.

ui:ComboboxTrigger​

PropDefaultRequired
label''No
variant'default'No
size'default'No
enabledtrueNo

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Mapped size choices: default, icon, iconLg, iconSm, iconXs, lg, sm, xs.

Mapped variant choices: default, destructive, ghost, link, outline, secondary.

Events​

  • on-press — explicitly emitted output; inspect the definition for payload shape.

Slots​

  • default — caller children.
Definition and forwarded payloads
<Component name="ComboboxTrigger" props="label='', variant='default', size='default', enabled=true">
<Pressable bind-label="props.label" bind-enabled="props.enabled" role="button" bind-class="'transition spring-fast ' + ({default: 'rc-button-default', secondary: 'rc-button-secondary', outline: 'rc-button-outline', ghost: 'rc-button-ghost', destructive: 'rc-button-destructive', link: 'rc-button-link'}[props.variant] + ' ' + {default: 'h-8 px-2.5', xs: 'h-6 px-2', sm: 'h-7 px-2.5', lg: 'h-9 px-2.5', icon: 'w-8 h-8 p-2', iconXs: 'w-6 h-6 p-1', iconSm: 'w-7 h-7 p-1.5', iconLg: 'w-9 h-9 p-2'}[props.size])" on-press="emit press with event">
<Row class="h-full flex-1 items-center justify-center gap-2">
<Slot>
<Text bind-text="props.label" class="font-rc-small font-medium" />
</Slot>
</Row>
</Pressable>
</Component>

Read ComboboxTrigger source.

ui:ComboboxValue​

PropDefaultRequired
text''No

Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.

Events​

No directly emitted output events.

Slots​

No content outlets.

Definition and forwarded payloads
<Component name="ComboboxValue" props="text=''">
<Text bind-text="props.text" class="font-rc-small font-medium" />
</Component>

Read ComboboxValue source.

Composition and accessibility​

Use explicit value/change ownership; events do not bubble automatically. A component forwards only outputs declared by its own emits. Slots retain caller scope. Supply meaningful labels for interactive controls, preserve focus and touch targets, and test reduced motion on each platform.

Component customization · Definitions and slots · Components index