Skip to content
On this page

NcAvatar

Props

Prop nameDescriptionTypeValuesDefault
urlSet a custom url to the avatar image
either the url, user or displayName property must be defined
string-undefined
iconClassSet a css icon-class for an icon to be used instead of the avatar.string-undefined
userSet the user id to fetch the avatar
either the url, user or displayName property must be defined
string-undefined
showUserStatusWhether or not to display the user-statusboolean-true
showUserStatusCompactWhether or not to the status-icon should be used instead of online/awayboolean-true
preloadedUserStatusWhen the user status was preloaded via another source it can be handed in with this property to save the request.
If this property is not set the status will be fetched automatically.
If a preloaded no-status is available provide this object with properties "status", "icon" and "message" set to null.
object-undefined
isGuestIs the user a guest user (then we have to user a different endpoint)boolean-false
displayNameSet a display name that will be rendered as a tooltip
either the url, user or displayName property must be defined
specify just the displayname to generate a placeholder avatar without
trying to fetch the avatar based on the user id
string-undefined
sizeSet a size in px for the rendered avatarnumber-32
allowPlaceholderPlaceholder avatars will be automatically generated when this is set to trueboolean-true
disableTooltipDisable the tooltipboolean-false
disableMenuDisable the menuboolean-false
tooltipMessageDeclares a custom tooltip when not null
Fallback will be the displayName

requires disableTooltip not to be set to true
string-null
titleDeclares a native tooltip when not null

requires disableTooltip not to be set to true
requires tooltipMessage not to be provided
string-null
isNoUserDeclares username is not a user's name, when true.
Prevents loading user's avatar from server and forces generating colored initials,
i.e. if the user is a group
boolean-false
menuPositionChoose the avatar menu alignment.
Possible values are left, center, right.
string-'center'
menuContainerSelector for the popover menu containerstring|object|Element|boolean-'body'
ariaLabelstring-null

Slots

NameDescriptionBindings
iconIcon slot

Basic user avatar

loading...

Avatar with image

loading...

Avatar with material design icon

loading...

Avatar with preloaded status

loading...

Avatar for non-users

loading...

Avatar on complex background

loading...