## avatar (`poetry_avatar`)

A user's image with an initials fallback.

Class: Poetry::Ui::Avatar::Component - BEM block `poetry-ui-avatar`.
Content block REQUIRED (the initials fallback) - a blockless call raises.
- `label:` (string) - required - The person's name - the avatar's accessible name (blank raises). The required flag also carries the fact to the registry so static checks see it.
- `size:` (symbol) - one of default|sm|lg, default "default" - The diameter axis.
- `src:` (string) - The image URL; without it only the initials fallback shows.
Slots: badge (Decorative presence dot, bottom-right; keep the status meaning in label:.).
- PART `avatar` - Root span (role=img carrying the accessible name) - fallback, image, and badge layer inside it | states: data-size=default|sm|lg (always - the resolved size)
- PART `avatar-fallback` - The initials layer (the content block) - always in the DOM, showing until the image covers it
- PART `avatar-image` - The <img> layered absolutely over the fallback - only when src: is given; a failed load paints nothing
- PART `avatar-badge` - The decorative presence dot (the badge slot), bottom-right
In blocks: `app-shell` - for a screen, start from the block (MCP compose/describe_block, or `bin/rails g poetry:block`), not from scratch.
- RULE: label: (the person's name) is REQUIRED - it is the avatar's accessible name (role=img).
- RULE: The content block is the fallback (initials) and is also required - it is what shows while the image loads or when it fails.
- RULE: The badge slot is decorative (a presence dot); put the status meaning in label:, not in the badge.
- RULE: Stack avatars with poetry_avatar_group; the overflow count is poetry_avatar_group_count.
