Avatar
A hero portrait component with faction-based border frames. Accepts an image via src or a custom fallback snippet.
Default — All Sizes



Orc — All Sizes



Elf — All Sizes



Human — All Sizes



Undead — All Sizes



Fallback Snippet
Used when no src is provided.
D
O
E
H
U
Usage
<script>
import { Avatar } from 'warcraftcn-ui-svelte';
</script>
<Avatar src="/hero.jpg" alt="Hero" faction="orc" size="md" />
<Avatar faction="elf" size="sm">
{#snippet fallback()}
<span>E</span>
{/snippet}
</Avatar>Props
| Prop | Type | Default |
|---|---|---|
| src | string | — |
| alt | string | "" |
| faction | "default" | "orc" | "elf" | "human" | "undead" | "default" |
| size | "sm" | "md" | "lg" | "md" |
| fallback | Snippet | — |