Props
| Name | Description |
|---|---|
alt Type: stringDefault"" | Alternative text for the image, used for accessibility. Without it the avatar is labelled with Describes the photo. When written it wins over |
color Type: string | booleanDefaultfalse | Paints the fallback (initials or icon).
|
name Type: string | The person's name. With no image and no default slot, the avatar shows its initials (first letters of the first and last word; none: the person icon). Also the accessible name when Pass it for every person: it is the accessible name and the initials, and the input of |
pt Type: PtMap<BbAvatarPtPart, never> | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
size Type: Responsive<number | CssSize | keyof Sizes>Default"md" | The avatar's width and height: a size-map key, a CSS length ( The same scale |
sizes Type: string | Sizes attribute for the image, used with Passes straight through to the |
src Type: string | Source URL of the avatar image. See example |
srcset Type: string | Responsive image source set. Passes straight through to the |
timeout Type: numberDefault400 | Milliseconds to wait after mount before checking whether the image loaded correctly (SSR fallback). The deadline is a safety net for prerendered pages, where the image events can fire before hydration. It is not terminal: the |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
default Type: Record<string, never> | Fallback content shown when no image source is provided or when the image fails to load. Typically used to render initials or a placeholder icon. The one sanctioned place to hand-place a |