Props
| Name | Type | Default | Description |
|---|---|---|---|
alt | string | undefined | "" | 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 | PtMap<BbAvatarPtPart, never> | undefined | - | Passthrough, object form: the same keys as the |
pt:icon | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
size | number | ({ size?: any; } & string) | keyof Sizes | undefined | "md" | Defines the component size.
Accepted values:
- A key from the provided size map ( The same scale |
sizes | string | undefined | - | Sizes attribute for the image, used with Passes straight through to the |
src | string | undefined | - | Source URL of the avatar image. See example |
srcset | string | undefined | - | Responsive image source set. Passes straight through to the |
timeout | number | undefined | 400 | 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 | Type | Description |
|---|---|---|
default | 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 |
Changes from v2
Props removed or renamed in 3.0. If you are coming from v2, the answer is here.
colorremovedfails silently