Import
import { Avatar } from '@dnb/eufemia'
Description
Avatars are identifiers that makes people and companies more scannable for payments, spending overviews and social functionality. The fallback for a person is the letter version that uses the first letter of a persons name. A company has the icon version as it's default/fallback. The badge is used to mark country/currency if needed.
Relevant links
Demos
Avatar
To ensure the correct use of Avatars, we require using a Avatar.Group
with Avatar
-components as children.
The required label
-property in Avatar.Group
will ensure the correct use of accessibility for screen readers.
See more examples below.
size
Setting property size
is 'medium'
default size
'small'
size
'medium'
size
'large'
size
'x-large'
variant
Setting property variant
is 'primary'
default variant
'primary'
variant
'secondary'
variant
'tertiary'
icon
Passing Auto-size
An icon will automatically be given the correct size (size="auto"
) unless the icon's size
prop is set.
Accepted values
The icon
prop can accept either an imported icon, a primary icon string, or an <Icon>
or <IconPrimary>
component.
import {calendar_medium as CalendarMedium,} from '@dnb/eufemia/src/icons'
children
Passing Icon as child
A single <Icon>
or <IconPrimary>
component sent as a child will also follow the same auto sizing rules as the icon
prop.
src
Passing image as 


Grouping Avatars



