# `ShadcnUI.Components.Foundation.Avatar`
[🔗](https://github.com/pcharbon70/shadcn_ui/blob/main/lib/shadcn_ui/components/foundation/avatar.ex#L1)

Initials-first identity presentation with an optional caller-owned image.

Applications own image URLs, privacy, caching, loading, failure policy,
uploads, and identity records. Avatar performs no lookup or image lifecycle
handling.

# `avatar`

Renders stable initials with an optional image overlay.

`image_src` and a nonblank `image_alt` must be provided together. When an
image is present its alternative text supplies the accessible name and the
visible initials are hidden from assistive technology to avoid duplication.

## Attributes

* `initials` (`:string`) (required)
* `image_src` (`:string`) - Defaults to `nil`.
* `image_alt` (`:string`) - Defaults to `nil`.
* `size` (`:atom`) - Defaults to `:default`. Must be one of `:small`, `:default`, or `:large`.
* `stack_position` (`:atom`) - Defaults to `:none`. Must be one of `:none`, `:first`, `:middle`, or `:last`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
