@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
41 lines (38 loc) • 1.2 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { AvatarProps } from './types.js';
import '@radix-ui/react-avatar';
import 'react';
import 'tailwind-variants';
import './styles.js';
import 'tailwind-merge';
/**
* Avatar - A user profile image component with fallback support
*
* Displays a user's profile image with automatic fallback to a default person icon
* when the image fails to load. Supports multiple sizes and can include status badges.
* Built on Radix UI Avatar for accessibility and reliability.
*
* @example
* // Basic avatar with image
* <Avatar imageProps={{ src: "/user.jpg", alt: "User Name" }} />
*
* @example
* // Avatar with fallback and custom size
* <Avatar
* size="large"
* imageProps={{ src: "/user.jpg", alt: "User Name" }}
* fallbackProps={{ children: "UN" }}
* />
*
* @example
* // Avatar with status badge
* <Avatar imageProps={{ src: "/user.jpg", alt: "User Name" }}>
* <Badge variant="success" />
* </Avatar>
*
* @example
* // Avatar with only initials fallback
* <Avatar fallbackProps={{ children: "JD" }} />
*/
declare function Avatar({ ref, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
export { Avatar };