API reference: @salmonui/layout/avatar
AvatarPropsinterface
import type { AvatarProps } from '@salmonui/layout/avatar';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;
}
| Name | Signature | Description |
|---|---|---|
srcoptional | readonly src?: string | undefined; | Image URL; layered over the initials and hidden when it fails to load. |
altoptional | readonly alt?: string | undefined; | Accessible name of the image (wins over |
nameoptional | readonly name?: string | undefined; | Person or entity name: the initials and the accessible name. |
localeoptional | readonly locale?: string | readonly string[] | undefined; | Locale for upper-casing the initials (default: the runtime's default locale). |
fallbackoptional | readonly fallback?: ReactNode; | Content shown without initials (an icon), decorative. |
childrenoptional | readonly children?: ReactNode; | Overrides the initials text. |
sizeoptional | readonly size?: AvatarSize | number | undefined; | A named size (default |
shapeoptional | readonly shape?: AvatarShape | undefined; | Default |
toneoptional | readonly tone?: AvatarTone | undefined; | Default |
variantoptional | readonly variant?: AvatarVariant | undefined; | Default |