avatar
The avatar widget can be used as a unique visual identifier, for example, to display a profile photo, company logo, initials, or flags. Additionally, text or a description can be added. The avatar can be used alone or combined with another widget inside a widget/group.
Configuration options
text
Display text content on the widget surface when the URI is empty, for example, initials.
bottom
The component will be added to the bottom of the widget.
footer
Add text to the footer of the widget.
footerAlign
Align the footer text to left, right, center.
placeholders
Specify a placeholder text to display if there is no data, for example - title: No data to display.
top
The component will be added to the top of the widget.
uri
Provide the uri for the image. The following can be used:
https//: imagesource
image from a datasource referenced in an expression
Examples and code snippets
Avatar widget example

This is a simple example of using the avatar widget to show a quick overview of the next meeting.
Examples: See the complete example using static data in GitHub. See the complete example using dynamic data in GitHub.
Datasources: See the complete datasource for static data in GitHub. See the complete datasource for dynamic data in GitHub.
widgets:
avatar-widget:
type: widget.avatar
options:
text: =$substring($substringBefore(@ctx.datasources.static-global.name, " "), 0, 1) & $substring($substringAfter(@ctx.datasources.static-global.name, " "), 0, 1)
uri: [email protected]
bottom:
type: component.titles
options:
align: center
title: [email protected]
subtitle: =$fromMillis($toMillis(@ctx.datasources.static-global.date_from),'[H01]:[m01]') & '-' & $fromMillis($toMillis(@ctx.datasources.static-global.date_to),'[H01]:[m01]')widgets:
avatar-meeting:
type: widget.avatar
options:
text: =$substring($substringBefore(@ctx.datasources.dynamic-global.name, " "), 0, 1) & $substring($substringAfter(@ctx.datasources.dynamic-global.name, " "), 0, 1)
uri: [email protected]
bottom:
type: component.titles
options:
align: center
title: [email protected]
subtitle: =$fromMillis($toMillis(@ctx.datasources.dynamic-global.date-from),'[H01]:[m01]') & '-' & $fromMillis($toMillis(@ctx.datasources.dynamic-global.date-to),'[H01]:[m01]')
Avatar widget with title
This is example shows the avatar widget using the component.title to add a name and icon to the widget.
Examples: See the complete example in GitHub.
Avatar widget/group with list

Here is the avatar widget associated with the list widget inside the group widget. The next patient is displayed as an avatar and the next three patients are on the list for a better overview.
Examples: See the complete example using static data in GitHub See the complete example using dynamic data in GitHub
Datasources: Full datasource for static data for avatar widget and for the list widget in GitHub. Full datasource for dynamic data for avatar widget and for the list widget in GitHub.
Avatar widget/group with title and list
In this example the avatar widget is combined with the list widget inside the group widget. The avatar widget has a component.title configured at the top to show a time and bottom to add a title and subtitle to the avatar widget.
Examples: See the complete example in GitHub.

Last updated
Was this helpful?