Skip to main content

Dropdown Menu

Shared, editable XML components from the dropdown-menu 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:DropdownMenu />
</ui:Theme>

Dependencies: checkbox, radio-group, theme.

Exports​

ui:DropdownMenu · ui:DropdownMenuCheckboxItem · ui:DropdownMenuClose · ui:DropdownMenuContent · ui:DropdownMenuDescription · ui:DropdownMenuFooter · ui:DropdownMenuGroup · ui:DropdownMenuHeader · ui:DropdownMenuItem · ui:DropdownMenuLabel · ui:DropdownMenuRadioGroup · ui:DropdownMenuRadioItem · ui:DropdownMenuSeparator · ui:DropdownMenuShortcut · ui:DropdownMenuSub · ui:DropdownMenuSubClose · ui:DropdownMenuSubContent · ui:DropdownMenuSubDescription · ui:DropdownMenuSubFooter · ui:DropdownMenuSubHeader · ui:DropdownMenuSubTitle · ui:DropdownMenuSubTrigger · ui:DropdownMenuTitle · ui:DropdownMenuTrigger

PropDefaultRequired
valuefalseNo
title''No
description''No
side'bottom'No
dismissibletrueNo
anchor'trigger'No
closeOnSelecttrueNo

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.

  • on-change — explicitly emitted output; inspect the definition for payload shape.
  • on-selected — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenu" props="value=false, title='', description='', side='bottom', dismissible=true, anchor='trigger', closeOnSelect=true">
<Popup mode="anchored" 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" bind-anchor="props.anchor" class=" enter:opacity-0 exit:opacity-0 enter:scale-95 exit:scale-95 spring-fast">
<SelectionGroup bind-value="null" mode="focus" orientation="vertical" activation="manual" class="rc-surface p-1 gap-0" on-activate="emit selected with event; if props.closeOnSelect then emit change with {value:false} end">
<Slot />
</SelectionGroup>
</Popup>
</Component>

Read DropdownMenu source.

PropDefaultRequired
valuefalseNo
label''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.

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

No content outlets.

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

Read DropdownMenuCheckboxItem source.

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.

  • on-press — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuClose" 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 DropdownMenuClose source.

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.

No directly emitted output events.

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

Read DropdownMenuContent source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuDescription source.

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.

No directly emitted output events.

  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuFooter">
<Row class="gap-2 justify-end">
<Slot />
</Row>
</Component>

Read DropdownMenuFooter source.

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.

No directly emitted output events.

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

Read DropdownMenuGroup source.

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.

No directly emitted output events.

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

Read DropdownMenuHeader source.

PropDefaultRequired
label''No
valuenullNo
selectedfalseNo
enabledtrueNo
variant'default'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.

Mapped variant choices: default, destructive.

  • on-press — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuItem" props="label='', value=null, selected=false, enabled=true, variant='default'">
<Pressable bind-label="props.label" bind-itemValue="props.value" bind-selected="props.selected" bind-enabled="props.enabled" role="menuitem" bind-class="'transition spring-fast ' + ('rc-item px-2 py-1.5 ' + {destructive:'text-rc-destructive',default:'text-rc-foreground'}[props.variant])" on-press="emit press with event">
<Row class="h-full flex-1 items-center gap-2">
<Slot>
<Text bind-text="props.label" />
</Slot>
</Row>
</Pressable>
</Component>

Read DropdownMenuItem source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuLabel source.

PropDefaultRequired
valuenullNo
label''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.

  • on-change — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuRadioGroup" props="value=null, label=''" xmlns:ui="urn:relo:registry:relo">
<ui:RadioGroup bind-value="props.value" bind-label="props.label" orientation="vertical" on-change="emit change with event">
<Slot />
</ui:RadioGroup>
</Component>

Read DropdownMenuRadioGroup source.

PropDefaultRequired
value—Yes
selectedfalseNo
label''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.

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

No content outlets.

Definition and forwarded payloads
<Component name="DropdownMenuRadioItem" props="value, selected=false, label='', enabled=true" xmlns:ui="urn:relo:registry:relo">
<ui:RadioGroupItem bind-value="props.value" bind-selected="props.selected" bind-label="props.label" bind-enabled="props.enabled" on-press="emit press with event" />
</Component>

Read DropdownMenuRadioItem source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuSeparator source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuShortcut source.

PropDefaultRequired
valuefalseNo
title''No
description''No
side'bottom'No
dismissibletrueNo
anchor'trigger'No
closeOnSelecttrueNo

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.

  • on-change — explicitly emitted output; inspect the definition for payload shape.
  • on-selected — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuSub" props="value=false, title='', description='', side='bottom', dismissible=true, anchor='trigger', closeOnSelect=true">
<Popup mode="anchored" 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" bind-anchor="props.anchor" class=" enter:opacity-0 exit:opacity-0 enter:scale-95 exit:scale-95 spring-fast">
<SelectionGroup bind-value="null" mode="focus" orientation="vertical" activation="manual" class="rc-surface p-1 gap-0" on-activate="emit selected with event; if props.closeOnSelect then emit change with {value:false} end">
<Slot />
</SelectionGroup>
</Popup>
</Component>

Read DropdownMenuSub source.

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.

  • on-press — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuSubClose" 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 DropdownMenuSubClose source.

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.

No directly emitted output events.

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

Read DropdownMenuSubContent source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuSubDescription source.

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.

No directly emitted output events.

  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuSubFooter">
<Row class="gap-2 justify-end">
<Slot />
</Row>
</Component>

Read DropdownMenuSubFooter source.

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.

No directly emitted output events.

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

Read DropdownMenuSubHeader source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuSubTitle source.

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.

  • on-press — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuSubTrigger" 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 DropdownMenuSubTrigger source.

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.

No directly emitted output events.

No content outlets.

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

Read DropdownMenuTitle source.

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.

  • on-press — explicitly emitted output; inspect the definition for payload shape.
  • default — caller children.
Definition and forwarded payloads
<Component name="DropdownMenuTrigger" 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 DropdownMenuTrigger 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