Docs
Avatar

Avatar

An image element with a fallback for representing the user.

Loading...
Loading...

Installation

npx shadcn-ng@latest add avatar
npm
yarn
pnpm
bun

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage

import {
    UbAvatarDirective,
    UbAvatarImageDirective,
    UbAvatarFallbackDirective
} from '@/components/ui/avatar.directive'
<span ubAvatar>
    <img src="https://github.com/adrian-ub.png" alt="@adrianub" ubAvatarImage />
    <span ubAvatarFallback>UB</span>
</span>