Showcase

Avatar

This documentation provides a comprehensive reference for the Avatar and AvatarGroup components, guiding you through their configuration options.
Demos

Screenshot #

Blazor Avatar Component

Avatar Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 1.0.0
AwayText string Away Gets or sets the accessible text for the Away status. 4.1.0
BusyText string Busy Gets or sets the accessible text for the Busy status. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
Color AvatarColor Secondary Gets or sets the background color of an initials or icon avatar. It has no visible effect while an image is shown. 4.1.0
CustomIconName string? null Gets or sets a custom icon CSS class, such as a Font Awesome class, used when no image or initials are shown. 4.1.0
IconName IconName None Gets or sets the Bootstrap icon shown when no image or initials are available. When neither this nor CustomIconName is set, a person icon is shown. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
ImageUrl string? null Gets or sets the image URL. When it is empty or fails to load, the avatar shows initials, then an icon. 4.1.0
Initials string? null Gets or sets the initials to show instead of the ones computed from Name. 4.1.0
Name string? null Gets or sets the name of the person or entity. It provides the initials and the accessible name. An avatar without a name is treated as decorative. 4.1.0
OfflineText string Offline Gets or sets the accessible text for the Offline status. 4.1.0
OnlineText string Online Gets or sets the accessible text for the Online status. 4.1.0
Shape AvatarShape Circle Gets or sets the avatar shape. Inside an AvatarGroup, the group's shape is used instead. 4.1.0
Size AvatarSize Medium Gets or sets the avatar size. Inside an AvatarGroup, the group's size is used instead. Set the --bb-avatar-size CSS custom property to use any other size. 4.1.0
Status AvatarStatus None Gets or sets the presence status shown as an indicator at the bottom-end corner. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0

AvatarGroup Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 1.0.0
ChildContent RenderFragment? null Gets or sets the avatars to display. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
Max int? null Gets or sets the maximum number of avatars to show, not counting the "+N" button. When it is null, every avatar is shown. A value below 1 is not allowed. 4.1.0
OverflowTextFormat string {0} more Gets or sets the format of the accessible text of the "+N" button. {0} is replaced with the number of hidden avatars. 4.1.0
Shape AvatarShape Circle Gets or sets the shape of every avatar in the group and of the "+N" button. 4.1.0
Size AvatarSize Medium Gets or sets the size of every avatar in the group and of the "+N" button. Set the --bb-avatar-size CSS custom property on the group to use any other size, and --bb-avatar-group-overlap to change the overlap. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0

AvatarSize Enum #

Name Value Description Added Version
Small 0 Indicates a small avatar. 4.1.0
Medium 1 Indicates a medium avatar. 4.1.0
Large 2 Indicates a large avatar. 4.1.0
ExtraLarge 3 Indicates an extra large avatar. 4.1.0

AvatarShape Enum #

Name Value Description Added Version
Circle 0 Renders the avatar as a circle. 4.1.0
Rounded 1 Renders the avatar as a square with rounded corners. 4.1.0
Square 2 Renders the avatar as a square. 4.1.0

AvatarColor Enum #

Name Value Description Added Version
None 0 No color styling is applied. 4.1.0
Primary 1 Applies the primary theme color. 4.1.0
Secondary 2 Applies the secondary theme color. 4.1.0
Success 3 Applies the success theme color. 4.1.0
Danger 4 Applies the danger theme color. 4.1.0
Warning 5 Applies the warning theme color. 4.1.0
Info 6 Applies the info theme color. 4.1.0
Light 7 Applies the light theme color. 4.1.0
Dark 8 Applies the dark theme color. 4.1.0

AvatarStatus Enum #

Name Value Description Added Version
None 0 No status indicator is shown. 4.1.0
Online 1 Indicates the person is online. 4.1.0
Away 2 Indicates the person is away. 4.1.0
Busy 3 Indicates the person is busy. 4.1.0
Offline 4 Indicates the person is offline. 4.1.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.