The Avatar Group component for Retool Apps
A group of avatars to display information and profile images for users.
Avatar Group adjusts the number of avatars shown to fit within its width or according to the specified maximum number, whichever is smaller. If there are more, the final avatar is a count of user photos that cannot be shown.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
fallbacks
A list of text to display if there are no images or icons.
Type | array | ||||
Array values | string | ||||
Mutability |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
horizontalAlign
The horizontal alignment of the contents.
Type | string | ||||||||
Format | Plain Text | ||||||||
Mutability |
| ||||||||
Allowed Values |
| ||||||||
Default |
|
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
query1
button1
imageSize
The size of the avatar.
Type | number | ||||||||||||
Mutability | Read-only | ||||||||||||
Allowed Values |
|
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
4px 8px
maxItems
The maximum number of avatars to show. Additional items are grouped into a single avatar.
Type | number | ||||
Mutability |
|
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
style
Custom style options.
Type | object | ||||
Mutability |
|
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
avatarGroup.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
avatarGroup.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring avatarGroup
into view.
avatarGroup.scrollIntoView({behavior: 'auto', block: 'nearest'});
avatarGroup.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
avatarGroup.setHidden(hidden)
Parameters
Examples
true
Examples
Hide avatarGroup
.
avatarGroup.setHidden(true);
Unhide avatarGroup
.
avatarGroup.setHidden(false);
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|