Input Otp
Shared, editable XML components from the input-otp 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:InputOTP />
</ui:Theme>
Dependencies: theme.
Exports
ui:InputOTP · ui:InputOTPGroup · ui:InputOTPSeparator · ui:InputOTPSlot
ui:InputOTP
| Prop | Default | Required |
|---|---|---|
value | '' | No |
label | 'Verification code' | No |
length | 6 | No |
pattern | 'numeric' | No |
enabled | true | No |
gap | 8 | No |
radius | 6 | No |
validationMessage | null | No |
cells | null | 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.on-complete— explicitly emitted output; inspect the definition for payload shape.
Slots
default— caller children.
Definition and forwarded payloads
<Component name="InputOTP" props="value='', label='Verification code', length=6, pattern='numeric', enabled=true, gap=8, radius=6, validationMessage=null, cells=null">
<RcNativeOTP bind-value="props.value" bind-label="props.label" bind-length="props.length" bind-pattern="props.pattern" bind-enabled="props.enabled" bind-gap="props.gap" bind-radius="props.radius" bind-validationMessage="props.validationMessage" on-change="emit change with event" on-complete="emit complete with event" class="text-rc-foreground">
<Row class="gap-2 items-center">
<Slot>
<For each="cell" in="props.cells ?? [[], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]][props.length]" key="cell">
<View part="otp-slot" class="w-8 h-8 border border-rc-input rounded-rc-md bg-rc-background" />
</For>
</Slot>
</Row>
</RcNativeOTP>
</Component>
ui:InputOTPGroup
| 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
default— caller children.
Definition and forwarded payloads
<Component name="InputOTPGroup">
<Row class="gap-0 items-center">
<Slot />
</Row>
</Component>
ui:InputOTPSeparator
| 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="InputOTPSeparator" xmlns:ui="urn:relo:registry:relo">
<ui:IconMinus class="w-4 h-4" />
</Component>
Read InputOTPSeparator source.
ui:InputOTPSlot
| 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
default— caller children.
Definition and forwarded payloads
<Component name="InputOTPSlot">
<View class="w-8 h-8 border border-rc-input rounded-rc-md bg-rc-background" part="otp-slot">
<Slot />
</View>
</Component>
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