Spelte

Command Palette
Search for a command to run...

Fallback Avatar

A unique gradient avatar generated from a name string.

xxtomm
max
hugh
diana
solo

Installation

pnpm dlx shadcn-svelte@latest add https://spelte.dev/r/fallback-avatar.json

Usage

<script>
  import FallbackAvatar from '$registry/spelte/fallback-avatar.svelte';
</script>
 
<FallbackAvatar name="username" size={32} />

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | name | string | — | String used to derive unique colors and blob positions | | size | number | 32 | Pixel size of the avatar | | animated | boolean | true | Blobs orbit and breathe on hover | | class | string | — | Additional CSS classes |