dtkt.protoui.v1beta1protoui.protoAvatar
MessageRender as an avatar with image or initials.
Maps to Avatar in @dtkt/ui/avatar
Use CEL expressions to generate src URL, initials, and alt text.
The message or field is available as this in the expression context.
Example src: this.avatar_url, initials: this.first_name.substring(0, 1) + this.last_name.substring(0, 1), alt: this.first_name + " " + this.last_name
| Field | Type | Number | Description |
|---|---|---|---|
| src | string | 1 | Optional CEL expression for the source URL of the avatar image.
Context: |
| initials | string | 2 | Optional CEL expression for initials to display when no image is available.
Context: |
| alt | string | 3 | Optional CEL expression for alternative text.
Context: |
| square | bool | 4 | Whether to render as square instead of circle. |