User Avatar

A theme-aware avatar component that displays the current user's profile image. Falls back to the user's initials if no image is available, and to an icon if the user has no name set.

Usage

component.tsx
import { UserAvatar } from "@/components/ui/user-avatar"

export default function Page() {
    return (
        <UserAvatar />
    )
}

Fallback Behavior

StateDisplay
User has a profile imageDisplays the profile image.
User has no image but has a nameDisplays the user's initials.
User has no image and no nameDisplays a UserRound icon.

The user-avatar.tsx file already comes in the EasyToLaunch repo by default.

On this page