Avatar
Last update: 2.1.0 (30/01/2024)
The Avatar component builds upon the Image component, appearing as a round image with a custom icon placeholder.
Usage
Overriding default props
Setting a fill variant
Customizing the placeholder
Props
Extends ImageProps
.
Property
Type
Description
variant
FillVariant
Defines the fill variant for this avatar. Defaults to theme default.
size
ComponentSize
Defines the size of this avatar. Defaults to theme default.
outline
boolean
Whether to render an outline in the placeholder.
secondaryIcon
ReactNode
An optional secondary icon to display near the avatar.
spanStyle
CSSProperties
Optional styles to pass to the containing span component.
Changelog
2.1.0:
Removed
placeholderColor
prop; usecolor
instead.Added
size
,outline
,spanStyle
,secondaryIcon
andsecondaryIconProps
props.
Last updated
Was this helpful?