Avatar
A component used to display user profile images or placeholders. Can be customized with text, icons, or images.
A component used to display user profile images or placeholders. Can be customized with text, icons, or images.
Basic usage example to quickly see how the Avatar works.
K
Interactive configurator to explore customization options for the Avatar component.
Displays multiple avatars grouped together, often used to represent a collection of users or entities. Automatically manages overlapping, spacing, and responsive behavior.
Use
Avatar.Groupwhen you need to show a team, participants, or related profiles compactly and clearly.
type T = "root" | "group" | "image" | "fallback";| Styles API | Type | Default | Annotation | 
|---|---|---|---|
| unstyled ? | Partial<Record<T, boolean>> | false | if true, all default styles will be removed | 
| classNames ? | Partial<Record<T, string>> | undefined | Set className for T | 
| styles ? | Partial<Record<T, CSSProperties>> | undefined | Set style for T | 
| Styles API | Type | Default | Annotation | 
|---|---|---|---|
| size ? | number | ${number} | 38 | Width and height of the avatar, numbers are converted to rem | 
| round ? | (string & {}) | number | 9999 | Key of CSS value to set border-radius. | 
| color ? | CSSProperties["color"] | "initials" | gray | Key of CSS color. | 
| src ? | ImageProps["src"] | null | undefined | Image url, if the image cannot be loaded or src={null}, then fallback is displayed instead | 
| alt ? | string | undefined | Image altattribute, also used astitleattribute for fallback | 
| imageProps ? | ImgProps | undefined | <NextImage/>tag attributes | 
| children ? | React.ReactNode | null | Avatar placeholder, displayed when src={null}or when the image cannot be loaded. | 
| fallback ? | React.ReactNode | null | A fallback tree to show when a Avatar src suspends. | 
| name ? | string | initials | Name of the user. When srcis not set, used to display initials and to generate color. | 
| allowedInitialsColors ? | CSSProperties["color"][] | undefined | An array of colors that can be used for autogenerated initials | 
Full working code example, including necessary markup and styles. You can copy and paste this code directly to start using the component immediately.