AvatarPlaceholderComponent
The AvatarPlaceholder
component displays the default avatar unless a custom template is provided. This component is used by the SDK internally, you likely won't need to use it.
#
Inputs and outputs#
name• name: undefined
| string
An optional name of the image, used for fallback image or image title (if imageUrl
is provided)
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:23
#
imageUrl• imageUrl: undefined
| string
The URL of the image to be displayed. If the image can't be displayed the first letter of the name input is displayed.
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:27
#
size• size: number
= 32
The size in pixels of the avatar image.
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:31
#
location• location: undefined
| AvatarLocation
The location the avatar will be displayed in
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:35
#
channel• Optional
channel: Channel
<DefaultStreamChatGenerics
>
The channel the avatar belongs to (if avatar of a channel is displayed)
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:39
#
user• Optional
user: User
<DefaultStreamChatGenerics
>
The user the avatar belongs to (if avatar of a user is displayed)
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:43
#
type• type: undefined
| AvatarType
The type of the avatar: channel if channel avatar is displayed, user if user avatar is displayed
#
Defined inlib/avatar-placeholder/avatar-placeholder.component.ts:47
#
initialsType• initialsType: "first-letter-of-first-word"
| "first-letter-of-each-word"
= 'first-letter-of-first-word'
If channel/user image isn't provided the initials of the name of the channel/user is shown instead, you can choose how the initals should be computed