Skip to main content

ui:Checkbox

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

Dependencies: theme.

Exports​

ui:Checkbox

ui:Checkbox​

PropDefaultRequired
valuefalseNo
label''No
enabledtrueNo
validationMessagenullNo

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="Checkbox" props="value=false, label='', enabled=true, validationMessage=null" xmlns:ui="urn:relo:registry:relo">
<Checkable bind-value="props.value" bind-label="props.label" bind-enabled="props.enabled" bind-validationMessage="props.validationMessage" role="checkbox" class="transition spring-fast disabled:opacity-50" on-change="emit change with event">
<Row class="h-full flex-1 items-center">
<Overlay class="w-4 h-4 rounded-rc-sm border border-rc-input">
<View bind-class="'w-4 h-4 bg-rc-primary rounded-rc-sm transition-opacity spring-fast ' + (props.value != false ? 'opacity-100' : 'opacity-0')" />
<ui:IconCheck show="props.value == true" class="w-4 h-4 text-rc-primary-foreground enter:opacity-0 exit:opacity-0 enter:scale-75 exit:scale-75 spring-fast" />
<ui:IconMinus show="props.value == null" class="w-4 h-4 text-rc-primary-foreground enter:opacity-0 exit:opacity-0 enter:scale-75 exit:scale-75 spring-fast" />
</Overlay>
</Row>
</Checkable>
</Component>

Read Checkbox 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