Collapsible
Shared, editable XML components from the collapsible 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:Collapsible />
</ui:Theme>
Dependencies: theme.
Exports
ui:Collapsible · ui:CollapsibleContent · ui:CollapsibleTrigger
ui:Collapsible
| Prop | Default | Required |
|---|---|---|
value | false | No |
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.
Events
on-change— explicitly emitted output; inspect the definition for payload shape.
Slots
default— caller children.trigger— useFill slot="trigger".
Definition and forwarded payloads
<Component name="Collapsible" props="value=false, label=''" xmlns:ui="urn:relo:registry:relo">
<Column class="gap-0">
<Pressable bind-label="props.label" bind-expanded="props.value" class="transition spring-fast rc-item py-2.5" on-press="emit change with {value: not props.value}">
<Row class="h-full flex-1 items-center justify-between gap-2">
<Slot name="trigger">
<Text bind-text="props.label" class="font-rc-small font-medium" />
</Slot>
<ui:IconChevronDown bind-class="'w-4 h-4 transition-transform spring-fast ' + (props.value ? 'rotate-180' : 'rotate-0')" />
</Row>
</Pressable>
<Column show="props.value" class="gap-2 pt-2 pb-2.5 transition-size spring-fast overflow-hidden">
<Slot />
</Column>
</Column>
</Component>
ui:CollapsibleContent
| Prop | Default | Required |
|---|---|---|
expanded | false | 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
default— caller children.
Definition and forwarded payloads
<Component name="CollapsibleContent" props="expanded=false">
<Column show="props.expanded" class="gap-2 pb-2.5 transition-size spring-fast overflow-hidden">
<Slot />
</Column>
</Component>
Read CollapsibleContent source.
ui:CollapsibleTrigger
| Prop | Default | Required |
|---|---|---|
value | false | No |
label | '' | No |
enabled | 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
on-change— explicitly emitted output; inspect the definition for payload shape.
Slots
default— caller children.
Definition and forwarded payloads
<Component name="CollapsibleTrigger" props="value=false, label='', enabled=true" xmlns:ui="urn:relo:registry:relo">
<Pressable bind-label="props.label" bind-expanded="props.value" bind-enabled="props.enabled" class="transition spring-fast rc-item py-2.5" on-press="emit change with {value: not props.value}">
<Row class="h-full flex-1 items-center justify-between gap-2">
<Slot>
<Text bind-text="props.label" />
</Slot>
<ui:IconChevronDown bind-class="'w-4 h-4 transition-transform spring-fast ' + (props.value ? 'rotate-180' : 'rotate-0')" />
</Row>
</Pressable>
</Component>
Read CollapsibleTrigger 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