# AvatarProps (@salmonui/layout/avatar)

> The AvatarProps interface of @salmonui/layout/avatar.

Canonical: https://salmonui.dev/docs/reference/layout/avatar/AvatarProps

```ts
import type { AvatarProps } from '@salmonui/layout/avatar';
```

Entry index: https://salmonui.dev/docs/reference/layout/avatar (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/layout/avatar.md).

## Reference

Kind: interface

```ts
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
    readonly src?: string | undefined;
    readonly alt?: string | undefined;
    readonly name?: string | undefined;
    readonly locale?: string | readonly string[] | undefined;
    readonly fallback?: ReactNode;
    readonly children?: ReactNode;
    readonly size?: AvatarSize | number | undefined;
    readonly shape?: AvatarShape | undefined;
    readonly tone?: AvatarTone | undefined;
    readonly variant?: AvatarVariant | undefined;
}
```

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `src` | `readonly src?: string \| undefined;` | optional | Image URL; layered over the initials and hidden when it fails to load. |
| `alt` | `readonly alt?: string \| undefined;` | optional | Accessible name of the image (wins over `name`). |
| `name` | `readonly name?: string \| undefined;` | optional | Person or entity name: the initials and the accessible name. |
| `locale` | `readonly locale?: string \| readonly string[] \| undefined;` | optional | Locale for upper-casing the initials (default: the runtime's default locale). |
| `fallback` | `readonly fallback?: ReactNode;` | optional | Content shown without initials (an icon), decorative. |
| `children` | `readonly children?: ReactNode;` | optional | Overrides the initials text. |
| `size` | `readonly size?: AvatarSize \| number \| undefined;` | optional | A named size (default `'md'`) or a size in px, e.g. `22`; the initials scale with it. |
| `shape` | `readonly shape?: AvatarShape \| undefined;` | optional | Default `'square'` (rounded rectangle). |
| `tone` | `readonly tone?: AvatarTone \| undefined;` | optional | Default `'neutral'`; colors come from the theme seeds. |
| `variant` | `readonly variant?: AvatarVariant \| undefined;` | optional | Default `'soft'`; `'solid'` fills with the tone color. |
