Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
Avatar component displays user's profile image, initials or fallback icon.
Always add alt
description with src
provided image
and iconLabel
description with icon
.
Name | Description | Default | Control |
---|---|---|---|
alt* | HTML <img> element's alt attribute valuestringundefined | - | |
color | Avatar's color "primary""secondary""tertiary""error""success""warning""info""uncolored" | "primary" | |
radius | Border radius value "md""xs""sm""lg""xl""none""full""round" | "full" | |
size | Size value "md""xs""sm""lg""xl""xxl" | "md" | |
disabled | Disabled styling boolean | - | |
bordered | Sets border of avatar's image wrapper boolean | - | |
name | Name that is used to generate initials for a fallback string | - | |
fadeInAnimation | Show fade-in animation on initial image load boolean | - | |
preloadFallbackSrc | Specifies whether the image from boolean | - | |
src | Defining string | - | |
as | ElementType<any> | img | - |
icon | Icon element displayed as an avatar.
Overrides ReactNode | - | |
fallback | Fallback element is not allowed when ReactNode | - | |
animationDuration | The duration of the fade-in animation AnimationDuration<string & {}> | - | |
fallbackSrc | URL to the fallback image. It's displayed during Overrides string | - | |
fallbackClassName | Fallbacks' wrapper class attributestring | - | |
wrapperClassName | Image wrapper class attributestring | - | |
wrapperProps | Image wrapper props Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className"> | - | |
ref | any | - |