Avatar
Shared, editable XML components from the avatar 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:Avatar />
</ui:Theme>
Dependencies: theme.
Exports
ui:Avatar · ui:AvatarBadge · ui:AvatarFallback · ui:AvatarGroup · ui:AvatarGroupCount · ui:AvatarImage
ui:Avatar
| Prop | Default | Required |
|---|---|---|
source | '' | No |
label | '' | No |
fallback | '?' | 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="Avatar" props="source='', label='', fallback='?'">
<Overlay state="{loaded:false}" class="w-10 h-10 rounded-full overflow-hidden bg-rc-muted">
<Text show="not loaded" bind-text="props.fallback" class="font-rc-small text-center" />
<Image if="props.source != ''" placeholder="none" bind-source="props.source" bind-label="props.label" fit="cover" class="w-10 h-10" on-load="set loaded to event.success" />
</Overlay>
</Component>
ui:AvatarBadge
| 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="AvatarBadge">
<Row class="rounded-full bg-rc-primary p-0.5">
<Slot />
</Row>
</Component>
ui:AvatarFallback
| Prop | Default | Required |
|---|---|---|
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.
Events
No directly emitted output events.
Slots
No content outlets.
Definition and forwarded payloads
<Component name="AvatarFallback" props="text=''">
<Text bind-text="props.text" class="font-rc-small text-center bg-rc-muted rounded-full p-2" />
</Component>
ui:AvatarGroup
| 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="AvatarGroup">
<Row class="gap-0">
<Slot />
</Row>
</Component>
ui:AvatarGroupCount
| Prop | Default | Required |
|---|---|---|
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.
Events
No directly emitted output events.
Slots
No content outlets.
Definition and forwarded payloads
<Component name="AvatarGroupCount" props="text=''">
<Text bind-text="props.text" class="font-rc-small font-medium" />
</Component>
ui:AvatarImage
| Prop | Default | Required |
|---|---|---|
source | — | Yes |
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-load— explicitly emitted output; inspect the definition for payload shape.
Slots
No content outlets.
Definition and forwarded payloads
<Component name="AvatarImage" props="source, label=''">
<Image bind-source="props.source" bind-label="props.label" fit="cover" class="rounded-full w-10 h-10" on-load="emit load with event" />
</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