# Avatar

Represents a person or account with an image and a reliable fallback. Use it in profiles, comments, and participant lists.

Package: `@kela-systems/ui-components` 4.1.0

```tsx
import { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge } from "@kela-systems/ui-components";
```

Links (Kela sign-in needed): [Storybook](https://main--6af1efd9453270bb59a6c00c.chromatic.com/?path=/docs/components-avatar--docs), [Source](https://github.com/Kela-Systems/kela/tree/main/packages/next/ui-components/src/avatar), [Figma](https://www.figma.com/design/anhlwrbFM6mUiL0klxeK1I/ARK---Design-System?node-id=23-988)

## Examples

### Sizes and groups

```tsx
import {
  Avatar,
  AvatarBadge,
  AvatarFallback,
  AvatarGroup,
  AvatarGroupCount,
  Stack,
} from "@kela-systems/ui-components";

export default function AvatarSizes() {
  return (
    <Stack gap={5}>
      <Stack direction="row" gap={3} align="center">
        <Avatar size="xs">
          <AvatarFallback>NA</AvatarFallback>
        </Avatar>
        <Avatar size="sm">
          <AvatarFallback>NA</AvatarFallback>
        </Avatar>
        <Avatar>
          <AvatarFallback>NA</AvatarFallback>
          <AvatarBadge />
        </Avatar>
        <Avatar size="lg">
          <AvatarFallback>NA</AvatarFallback>
        </Avatar>
        <Avatar size="xl">
          <AvatarFallback>NA</AvatarFallback>
        </Avatar>
      </Stack>
      <AvatarGroup>
        <Avatar>
          <AvatarFallback>NA</AvatarFallback>
        </Avatar>
        <Avatar>
          <AvatarFallback>DL</AvatarFallback>
        </Avatar>
        <Avatar>
          <AvatarFallback>YS</AvatarFallback>
        </Avatar>
        <AvatarGroupCount>+4</AvatarGroupCount>
      </AvatarGroup>
    </Stack>
  );
}
```

## Props

A `className` on a part adds layout only: placement, sizing and spacing. Pick a look with a variant.

### Avatar

| Variant | Values | Default |
| --- | --- | --- |
| `size` | `xs`, `sm`, `default`, `lg`, `xl` | `default` |

Also takes the props of `@base-ui/react/avatar`.

### AvatarImage

Also takes the props of `@base-ui/react/avatar`.

### AvatarFallback

Also takes the props of `@base-ui/react/avatar`.

### AvatarGroup

Also takes the attributes of the HTML element it renders.

### AvatarGroupCount

Also takes the attributes of the HTML element it renders.

### AvatarBadge

| Variant | Values | Default |
| --- | --- | --- |
| `variant` | `default`, `icon` | `default` |

Also takes the attributes of the HTML element it renders.
