Command Palette

Search for a command to run...

Docs
Basic Avatar

Basic Avatar

A basic avatar component with image and fallback support.

Installation

Usage

import AvatarBasic from "@/components/ruixen/avatar-basic";
 
export default function MyAvatar() {
  return (
    <AvatarBasic src="https://github.com/shadcn.png" alt="User" fallback="CN" />
  );
}

Props

PropTypeDefaultDescription
srcstring"https://github.com/shadcn.png"The image source URL
altstring"User"Alt text for the avatar image
fallbackstring"U"Fallback text when image fails
classNamestring-Additional CSS classes