A small mark on a corner: an icon, a count, a Badge. label is read
with the name, since the avatar is one image and its badges are not
announced on their own.
A group publishes its frame; each avatar in it is an AvatarSlots
avatar, and the count of those left out is one more, so it takes the same
size and shape. The +N's root carries data-rest, so a style can keep
it out of a colour by name.
A picture the application passes in place of a URL: it writes the img's
attributes, or none when it has no URL (the initials then stand alone).
Avatar.picture({ asset, provider, width }) makes one from foldkit-media;
it lives in a file of its own, so a page that passes src as text ships no
picture code. Implement it to draw pictures any other way.
An avatar publishes its regions as slots; it owns no state, messages, or
bundles. The picture stacks over the fallback initials, so the initials
show while it loads and where it fails; the browser owns loading. The root
is one image named by the person (and their status), so a screen reader
hears the name once, not the initials. It carries the name's hue as
--fk-avatar-hue (0 to 359, the same for the same name everywhere), for a
style that colours the initials by who they are. The status dot carries
data-status; a badge carries data-place, its corner.
An avatar in one call: who it pictures, the picture if there is one, a
style for its slots, and mixins beside the style. No upstream component
stands behind it. Without a picture the initials stand alone.
The application's own Avatar: base for every use, presets chosen at a
use with preset, and the call over both. A preset's style and words
reach a group's avatars too; its groupStyle is the group's own.
A picture foldkit-media writes the candidates of, as the avatar's picture:
the asset, the provider of its variants, and how wide the avatar is drawn in
CSS pixels (Avatar.widthOf(size)), so a 24px avatar fetches a 48px variant,
not the original. With a provider that has no URL for the asset the initials
stand alone. An application that passes src as text never imports this.
How wide an avatar of size is drawn, in CSS pixels at the browser's
default 16px rem: the width an AvatarPicture asks its candidates for, so
the recipe's size is written once.