# `PetalComponents.Avatar`
[🔗](https://github.com/petalframework/petal_components/blob/v3.2.0/lib/petal_components/avatar.ex#L1)

# `avatar`

## Attributes

* `src` (`:string`) - hosted avatar URL. Defaults to `nil`.
* `alt` (`:string`) - alt text for avatar image. Defaults to `nil`.
* `size` (`:string`) - Defaults to `"md"`. Must be one of `"xs"`, `"sm"`, `"md"`, `"lg"`, or `"xl"`.
* `class` (`:any`) - CSS class. Defaults to `nil`.
* `name` (`:string`) - name for placeholder initials. Defaults to `nil`.
* `random_color` (`:boolean`) - generates a random color for placeholder initials avatar. Defaults to `false`.
* Global attributes are accepted.

# `avatar_group`

## Attributes

* `size` (`:string`) - Defaults to `"md"`. Must be one of `"xs"`, `"sm"`, `"md"`, `"lg"`, or `"xl"`.
* `class` (`:any`) - CSS class. Defaults to `nil`.
* `avatars` (`:list`) - list of your hosted avatar URLs. Defaults to `[]`.
* Global attributes are accepted.

---

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