Command Palette

Search for a command to run...

Docs
Avatar with Status

Avatar with Status

An avatar component with customizable status indicator (online, offline, busy, away).

Installation

Usage

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

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
status"online" | "offline" | "busy" | "away""online"The status indicator to display
classNamestring-Additional CSS classes