Skip to main content

Command

Shared, editable XML components from the command 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:Command />
</ui:Theme>

Dependencies: input, theme.

Exports​

ui:Command · ui:CommandContent · ui:CommandDialog · ui:CommandDialogClose · ui:CommandDialogContent · ui:CommandDialogDescription · ui:CommandDialogFooter · ui:CommandDialogHeader · ui:CommandDialogTitle · ui:CommandDialogTrigger · ui:CommandEmpty · ui:CommandGroup · ui:CommandInput · ui:CommandItem · ui:CommandLabel · ui:CommandList · ui:CommandSeparator · ui:CommandShortcut · ui:CommandTrigger

ui:Command​

PropDefaultRequired
valuenullNo
items[]No
label'Choose'No
placeholder'Search'No
searchabletrueNo

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-selected — explicitly emitted output; inspect the definition for payload shape.

Slots​

  • empty — use Fill slot="empty".
Definition and forwarded payloads
<Component name="Command" props="value=null, items=[], label='Choose', placeholder='Search', searchable=true" xmlns:ui="urn:relo:registry:relo">
<Column state="{query:'', matches:props.items}" class="rc-surface p-1 gap-1">
<TextField if="props.searchable" presentation="editor" bind-label="props.label" bind-placeholder="props.placeholder" model="query" class="transition spring-fast border-0 p-2" on-change.latest="call uiQuery.match with {query:event.value, items:props.items} into result; set matches to result" />
<SelectionGroup bind-value="props.value" mode="single" orientation="vertical" bind-label="props.label" class="gap-0" on-change="emit change with event">
<For each="option" in="matches" key="option.id">
<Pressable bind-label="option.label" bind-itemValue="option.id" bind-selected="props.value == option.id" bind-enabled="option.enabled ?? true" class="transition spring-fast rc-item px-2 py-1.5" on-press="emit selected with {value:option.id,label:option.label}">
<Row class="h-full flex-1 items-center gap-2">
<Text bind-text="option.label" class="font-rc-small" />
<ui:IconCheck show="props.value == option.id" class="w-4 h-4" />
</Row>
</Pressable>
</For>
</SelectionGroup>
<Column if="matches == []" class="p-4">
<Slot name="empty">
<Text text="No results" class="font-rc-small text-rc-muted-foreground text-center" />
</Slot>
</Column>
</Column>
</Component>

Read Command source.

ui:CommandContent​

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="CommandContent">
<Column class="gap-1">
<Slot />
</Column>
</Component>

Read CommandContent source.

ui:CommandDialog​

PropDefaultRequired
valuefalseNo
title''No
description''No
side'bottom'No
dismissibletrueNo

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​

  • default — caller children.
  • footer — use Fill slot="footer".
Definition and forwarded payloads
<Component name="CommandDialog" props="value=false, title='', description='', side='bottom', dismissible=true">
<Popup mode="modal" bind-value="props.value" bind-label="props.title" bind-description="props.description" bind-side="props.side" bind-dismissible="props.dismissible" on-change="emit change with event" class=" enter:opacity-0 exit:opacity-0 enter:scale-95 exit:scale-95 spring-fast">
<Column class="rc-surface p-4 gap-4">
<Text bind-text="props.title" class="font-rc-body font-medium" />
<Text if="props.description != ''" bind-text="props.description" class="font-rc-small text-rc-muted-foreground" />
<Slot />
<Slot name="footer" />
</Column>
</Popup>
</Component>

Read CommandDialog source.

ui:CommandDialogClose​

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="CommandDialogClose" 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 CommandDialogClose source.

ui:CommandDialogContent​

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="CommandDialogContent">
<Column class="gap-4">
<Slot />
</Column>
</Component>

Read CommandDialogContent source.

ui:CommandDialogDescription​

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="CommandDialogDescription" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>

Read CommandDialogDescription source.

ui:CommandDialogFooter​

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="CommandDialogFooter">
<Row class="gap-2 justify-end">
<Slot />
</Row>
</Component>

Read CommandDialogFooter source.

ui:CommandDialogHeader​

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="CommandDialogHeader">
<Column class="gap-1.5">
<Slot />
</Column>
</Component>

Read CommandDialogHeader source.

ui:CommandDialogTitle​

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="CommandDialogTitle" props="text=''">
<Text bind-text="props.text" class="font-rc-body font-medium" />
</Component>

Read CommandDialogTitle source.

ui:CommandDialogTrigger​

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="CommandDialogTrigger" 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 CommandDialogTrigger source.

ui:CommandEmpty​

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="CommandEmpty" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground p-4 text-center" />
</Component>

Read CommandEmpty source.

ui:CommandGroup​

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="CommandGroup">
<Column class="gap-1">
<Slot />
</Column>
</Component>

Read CommandGroup source.

ui:CommandInput​

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="CommandInput" 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 CommandInput source.

ui:CommandItem​

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="CommandItem" 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 CommandItem source.

ui:CommandLabel​

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="CommandLabel" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>

Read CommandLabel source.

ui:CommandList​

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="CommandList">
<Column class="gap-1">
<Slot />
</Column>
</Component>

Read CommandList source.

ui:CommandSeparator​

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="CommandSeparator">
<Divider class="bg-rc-border" />
</Component>

Read CommandSeparator source.

ui:CommandShortcut​

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="CommandShortcut" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>

Read CommandShortcut source.

ui:CommandTrigger​

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="CommandTrigger" 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 CommandTrigger 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