Props
| Name | Description |
|---|---|
alt Type: stringDefault"" | Alternative text for the image, used for accessibility. It does double duty: alternative text on the image, and the accessible name of the fallback, which the component labels with |
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: number | CssSize | keyof SizesDefault"md" | Defines the component size.
Accepted values:
- A key from the provided size map ( 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 |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
colorremovedfails silently