Context Menu
Shared, editable XML components from the context-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:ContextMenu />
</ui:Theme>
Dependencies: checkbox, radio-group, theme.
Exports
ui:ContextMenu · ui:ContextMenuArea · ui:ContextMenuCheckboxItem · ui:ContextMenuClose · ui:ContextMenuContent · ui:ContextMenuDescription · ui:ContextMenuFooter · ui:ContextMenuGroup · ui:ContextMenuHeader · ui:ContextMenuItem · ui:ContextMenuLabel · ui:ContextMenuRadioGroup · ui:ContextMenuRadioItem · ui:ContextMenuSeparator · ui:ContextMenuShortcut · ui:ContextMenuSub · ui:ContextMenuSubClose · ui:ContextMenuSubContent · ui:ContextMenuSubDescription · ui:ContextMenuSubFooter · ui:ContextMenuSubHeader · ui:ContextMenuSubTitle · ui:ContextMenuSubTrigger · ui:ContextMenuTitle · ui:ContextMenuTrigger
ui:ContextMenu
| Prop | Default | Required |
|---|---|---|
false | No | |
'' | No | |
'' | No | |
'bottom' | No | |
true | No | |
'trigger' | No | |
true | 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
- — explicitly emitted output; inspect the definition for payload shape.
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenu" 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>
ui:ContextMenuArea
| Prop | Default | Required |
|---|---|---|
true | 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
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuArea" props="enabled=true">
<Gesture kind="longPress" bind-enabled="props.enabled" on-gesture="if event.phase == 'began' then emit open with event end">
<Column>
<Slot />
</Column>
</Gesture>
</Component>
ui:ContextMenuCheckboxItem
| Prop | Default | Required |
|---|---|---|
false | No | |
'' | No | |
true | 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
- — explicitly emitted output; inspect the definition for payload shape.
Slots
No content outlets.
Definition and forwarded payloads
<Component name="ContextMenuCheckboxItem" 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 ContextMenuCheckboxItem source.
ui:ContextMenuClose
| Prop | Default | Required |
|---|---|---|
'' | No | |
'default' | No | |
'default' | No | |
true | 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 size choices: default, icon, iconLg, iconSm, iconXs, lg, sm, xs.
Mapped variant choices: default, destructive, ghost, link, outline, secondary.
Events
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuClose" 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>
ui:ContextMenuContent
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuContent">
<Column class="gap-4">
<Slot />
</Column>
</Component>
Read ContextMenuContent source.
ui:ContextMenuDescription
| Prop | Default | Required |
|---|---|---|
'' | 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="ContextMenuDescription" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>
Read ContextMenuDescription source.
ui:ContextMenuFooter
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuFooter">
<Row class="gap-2 justify-end">
<Slot />
</Row>
</Component>
Read ContextMenuFooter source.
ui:ContextMenuGroup
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuGroup">
<Column class="gap-1">
<Slot />
</Column>
</Component>
ui:ContextMenuHeader
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuHeader">
<Column class="gap-1.5">
<Slot />
</Column>
</Component>
Read ContextMenuHeader source.
ui:ContextMenuItem
| Prop | Default | Required |
|---|---|---|
'' | No | |
null | No | |
false | No | |
true | No | |
'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.
Events
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuItem" 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>
ui:ContextMenuLabel
| Prop | Default | Required |
|---|---|---|
'' | 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="ContextMenuLabel" props="text=''">
<Text bind-text="props.text" class="font-rc-small font-medium" />
</Component>
ui:ContextMenuRadioGroup
| Prop | Default | Required |
|---|---|---|
null | No | |
'' | 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
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuRadioGroup" 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 ContextMenuRadioGroup source.
ui:ContextMenuRadioItem
| Prop | Default | Required |
|---|---|---|
| — | Yes | |
false | No | |
'' | No | |
true | 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
- — explicitly emitted output; inspect the definition for payload shape.
Slots
No content outlets.
Definition and forwarded payloads
<Component name="ContextMenuRadioItem" 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 ContextMenuRadioItem source.
ui:ContextMenuSeparator
| Prop | Default | Required |
|---|---|---|
| — | 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="ContextMenuSeparator">
<Divider class="bg-rc-border" />
</Component>
Read ContextMenuSeparator source.
ui:ContextMenuShortcut
| Prop | Default | Required |
|---|---|---|
'' | 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="ContextMenuShortcut" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>
Read ContextMenuShortcut source.
ui:ContextMenuSub
| Prop | Default | Required |
|---|---|---|
false | No | |
'' | No | |
'' | No | |
'bottom' | No | |
true | No | |
'trigger' | No | |
true | 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
- — explicitly emitted output; inspect the definition for payload shape.
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuSub" 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>
ui:ContextMenuSubClose
| Prop | Default | Required |
|---|---|---|
'' | No | |
'default' | No | |
'default' | No | |
true | 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 size choices: default, icon, iconLg, iconSm, iconXs, lg, sm, xs.
Mapped variant choices: default, destructive, ghost, link, outline, secondary.
Events
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuSubClose" 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 ContextMenuSubClose source.
ui:ContextMenuSubContent
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuSubContent">
<Column class="gap-1">
<Slot />
</Column>
</Component>
Read ContextMenuSubContent source.
ui:ContextMenuSubDescription
| Prop | Default | Required |
|---|---|---|
'' | 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="ContextMenuSubDescription" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-rc-muted-foreground" />
</Component>
Read ContextMenuSubDescription source.
ui:ContextMenuSubFooter
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuSubFooter">
<Row class="gap-2 justify-end">
<Slot />
</Row>
</Component>
Read ContextMenuSubFooter source.
ui:ContextMenuSubHeader
| Prop | Default | Required |
|---|---|---|
| — | 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
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuSubHeader">
<Column class="gap-1.5">
<Slot />
</Column>
</Component>
Read ContextMenuSubHeader source.
ui:ContextMenuSubTitle
| Prop | Default | Required |
|---|---|---|
'' | 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="ContextMenuSubTitle" props="text=''">
<Text bind-text="props.text" class="font-rc-body font-medium" />
</Component>
Read ContextMenuSubTitle source.
ui:ContextMenuSubTrigger
| Prop | Default | Required |
|---|---|---|
'' | No | |
'default' | No | |
'default' | No | |
true | 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 size choices: default, icon, iconLg, iconSm, iconXs, lg, sm, xs.
Mapped variant choices: default, destructive, ghost, link, outline, secondary.
Events
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuSubTrigger" 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 ContextMenuSubTrigger source.
ui:ContextMenuTitle
| Prop | Default | Required |
|---|---|---|
'' | 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="ContextMenuTitle" props="text=''">
<Text bind-text="props.text" class="font-rc-body font-medium" />
</Component>
ui:ContextMenuTrigger
| Prop | Default | Required |
|---|---|---|
'' | No | |
'default' | No | |
'default' | No | |
true | 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 size choices: default, icon, iconLg, iconSm, iconXs, lg, sm, xs.
Mapped variant choices: default, destructive, ghost, link, outline, secondary.
Events
- — explicitly emitted output; inspect the definition for payload shape.
Slots
- — caller children.
Definition and forwarded payloads
<Component name="ContextMenuTrigger" 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 ContextMenuTrigger 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