Fallback Avatar

A seeded avatar canvas that renders a deterministic color composition with hover-only animation and a built-in 2D fallback.

xxtomm
svelte
neo
Aidan
dheeraj

Installation

pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/s/fallback-avatar.json

Usage

<script lang="ts">	import { FallbackAvatar } from "#lib/components/spell/fallback-avatar/index.js";</script>
<FallbackAvatar name="Svelte" />

Examples

Size

Use the same seeded avatar across multiple size values when you need tiny inline chips, default profile dots, or larger hero accents.

20px
28px
36px
44px

Animated

Compare hover-enabled rendering with a static variant when you want motion only in emphasis-heavy surfaces.

Animated

Hover to animate

Static

Animation disabled

Props

NameTypeDefaultDescription
namestringrequiredThe seed used to derive the avatar composition, color palette, and motion anchors.
sizenumber32Controls the rendered avatar size in CSS pixels.
animatedbooleantrueEnables the hover-only animation loop for the avatar surface.
classClassValueundefinedCustom classes merged onto the root canvas element.
stylestringundefinedInline styles appended to the root canvas element.