Optional
backgroundThe background color of the avatar (e.g., '#FF6600'). If not provided, a color will be deterministically generated from the username.
Optional
fontThe font family for the initials. Defaults to 'Arial, sans-serif'.
Optional
fontThe font size for the initials. If not provided, it will be calculated based on avatar size.
Optional
heightThe height of the avatar in pixels. Defaults to 100.
Optional
initialsThe maximum number of initials to display. Defaults to 2.
Optional
shapeThe shape of the avatar. Defaults to 'square'.
Optional
svgAdditional SVG attributes to apply to the root
Optional
textText to explicitly display on the avatar instead of generated initials.
If provided, initialsLength
and username-based initial generation will be ignored.
Optional
textThe color of the text (initials) on the avatar (e.g., '#FFFFFF'). If not provided, a contrasting color will be chosen based on the background.
Optional
widthThe width of the avatar in pixels. Defaults to 100.
Defines the options for generating an SVG avatar.