Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Avatar Group

<afp-avatar-group> Since 1.0.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

An avatar group component to display multiple avatars together.

Examples #

Basic #

Display a group of avatars.

Sizes #

Set the size attribute on the <avatar-group> to apply it to all child avatars.

Spacing #

Adjust the space between avatars by setting the --afp-avatar-group-space CSS variable.

Border #

Change the border to all avatars in a group by setting the --afp-avatar-border-color and --afp-avatar-border-width CSS variables.

With Max and Badge #

Limit the number of visible avatars by setting the max attribute. A badge will show the number of additional avatars not displayed.

Disabled #

Disable all avatars in a group by adding the disabled attribute to the <afp-avatar-group>

Properties

Learn more about properties.

Name Description Reflects
size
size of the avatar group
Type
AfpSize
Name Description
SMALL
Small size with compact dimensions.
MEDIUM
Medium size with standard dimensions.
LARGE
Large size with expanded dimensions.
AfpSize
Default AfpSize.MEDIUM
max
Maximum number of avatars to display. Additional avatars are hidden.
Type number
disabled
Disabled property of avatar.
Type boolean

Slots

Learn more about slots.

Name Description
default
The default slot for avatar elements.

Internationalization

Learn more about internationalization.

Key Description
avatar-group.aria-label
The default `aria-label` text for Avatar Group
avatar-group.count-text
The default text for the hidden avatar count

CSS Parts

Learn more about CSS Parts.

Name Description Selector
base
The avatar group container wrapper.
::part(base)
count
The element that displays the hidden avatar count.
::part(count)

CSS Custom Properties

Name Description Default
--afp-avatar-group-space
The space between avatars in the group.
0.3

Dependencies

The component automatically brings in the listed items, including any nested dependencies that may exist.

afp-avatar

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/avatar-group/avatar-group.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link