tom

Fallback Avatar

Component 2

About

A unique gradient avatar generated from a name string.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Fallback Avatar to your project and fits it to your theme.

Code

How Fallback Avatar is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import FallbackAvatar from "@/components/ui/fallback-avatar";

const sizes = [32, 48, 64, 96, 128];

function Demo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
      <div className="flex items-end gap-6 rounded-3xl border bg-card/70 p-8 shadow-sm backdrop-blur">
        {sizes.map((size) => (
          <div key={size} className="flex flex-col items-center gap-2">
            <FallbackAvatar className="border shadow-sm" name="spell" size={size} />
            <span className="text-[11px] text-muted-foreground">{size}px</span>
          </div>
        ))}
      </div>
    </div>
  );
}


export default { Demo };

More by tom

View all
  • Special Text

    Special Text

    1.1K
  • Shimmer Text

    Shimmer Text

    1.1K
  • Animated Gradient

    Animated Gradient

    963
  • Tilt Card

    Tilt Card

    874
  • Marquee

    Marquee

    778
  • Text Marquee

    Text Marquee

    751
  • QR Code

    QR Code

    451
  • Animated Checkbox

    Animated Checkbox

    384