Alert Dialog
An image element with a fallback for representing the user.
avatar
Usage
Avatarcomponent takes inclassName,src, andfallbackprops.classNameprop is used to style the Avatar component.srcprop is used to pass the image URL.fallbackprop is used to pass the fallback text for the image.
Interface for AvatarProps
interface AvatarProps
extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> {
className?: string;
fallback?: string;
src?: string;
}Customizable Design
More granular components provide you with more control over the design of the Avatar component. You can customize the design of the Avatar component by using the following sub-components:
avatar
- Style of every sub-component of the Avatar component can be customized using the
classNameprop. - Pass in a
CSS classor useTailwind CSSutility classes to style the Avatar component.