On This Page
An avatar shows one or more users avatars.
- Fluent
- Declarative
VerticalLayout.builder()
.content(List.of(
Avatar.builder().name("Mateu Pérez")
.build(),
Avatar.builder().name("Mateu Pérez")
.image("/images/mateu.png")
.build(),
new AvatarGroup(List.of(
Avatar.builder().name("Mateu Pérez").build(),
Avatar.builder().name("Antònia Galmés").build(),
Avatar.builder().name("Miguel Pérez").build()
), 2)
))
.build()
TBD
Available properties
This is the list of available properties for an avatar:
| Property | Description | Notes |
|---|---|---|
| id | id for this component | |
| cssClasses | list of css classes | content of the css attribute |
| style | inline style attributes | content of the style attribute |
| name | name of the avatar | automatically shows the initials |
| image | image for the avatar | |
| abbreviation | abbreviation | automatically shows the initials, if not present |
And this is the list of available properties for an avatar group:
| Property | Description | Notes |
|---|---|---|
| maxItemsVisible | a number | a +x will be showed if more items |
You can see a full explanation of those properties at https://vaadin.com/docs/latest/components/avatar