Show the photo, and the seeded face when there is no photo or it fails.
member-avatar.tsx
GeneratedAvatarImage
| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| seed | string | — | The text that picks the face: a user id or an email. Empty: nothing renders. |
| avatar | — | A DiceBear style definition (import glass from "@dicebear/styles/glass.json"). | |
| palette | GeneratedAvatarPalette | null | — | The hues per theme. Default: the chart tokens. null keeps the colors of the style. |
| options | GeneratedAvatarOptions | — | DiceBear options (flip, scale, a <part>Variant); they win over the palette. |
| alt | string | "" | The name for screen readers. Empty (the default) when a visible name is next to the face. |
| delay | number | 0 | Waits before the new face comes in, in ms, for a stagger over many faces. |
GeneratedAvatar
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| inset | boolean | — | |
| rounded | "default""full" | — | |
| size | "default""lg""sm""xl""xs" | — | |
| seed | string | — | The text that picks the face: a user id or an email. Empty: nothing renders. |
| avatar | — | A DiceBear style definition (import glass from "@dicebear/styles/glass.json"). | |
| palette | GeneratedAvatarPalette | null | — | The hues per theme. Default: the chart tokens. null keeps the colors of the style. |
| options | GeneratedAvatarOptions | — | DiceBear options (flip, scale, a <part>Variant); they win over the palette. |
| delay | number | — | Waits before the new face comes in, in ms, for a stagger over many faces. |
| name | string | — | The name for screen readers: on the face, or on the icon when seed is empty. |
| children | ReactNode | — | More parts on top, such as an AvatarBadge. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
Built with
Installs with Generated Avatar
- Components
- Avatar