tom

Fallback Avatar

Component 96

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 people = [
  "Maya Chen",
  "Noah Kim",
  "Ava Patel",
  "Leo Garcia",
  "Zoe Smith",
  "Eli Brown",
  "Nina Rossi",
  "Owen Lee",
];

function Demo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
      <div className="rounded-3xl border bg-card/70 p-8 shadow-sm backdrop-blur">
        <div className="mb-6">
          <p className="text-sm text-muted-foreground">Generated team avatars</p>
          <h3 className="text-2xl font-semibold tracking-tight">Fallback Avatar</h3>
        </div>
        <div className="grid grid-cols-4 gap-5">
          {people.map((name) => (
            <div key={name} className="flex flex-col items-center gap-2">
              <FallbackAvatar className="border shadow-sm" name={name} size={72} />
              <span className="max-w-24 truncate text-xs text-muted-foreground">
                {name}
              </span>
            </div>
          ))}
        </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