Skip to content

DocsDisplayAvatar

PT

Display

Avatar

Initials in a circle, in four sizes and six series colors, alone or in a group.

CSS only

Example

A C L A B +4

Installation

Avatar ships in the full package, in unslop.css:

curl -fsSL unslop.leallabs.dev/i | sh

No build It's just CSS: with unslop.css on the page, the classes already work.

Classes and variants

ClassWhat it does
u-avatar36px.
u-avatar--sm, --lg, --xl28, 48 and 92px.
data-c="1" a "6"Series color. Without data-c, it stays neutral.
u-avatarsOverlapping group, with a ring in the card color.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
textcontentThe initial is read as text. In a group, put the full name in an aria-label on the group or next to it.

Type to search. Arrows pick, Enter opens.