# Avatar
URL: https://pro.rv-grid.com/api/avatar/
Source: src/content/docs/api/avatar.md
## Module Extensions

### `ColumnRegular` (Extended from `@revolist/revogrid`)

```ts
interface ColumnRegular {
  avatarIndexProp?: ColumnProp;
  avatarLabelProp?: ColumnProp;
  avatarProp?: ColumnProp;
  avatarSize?: number;
  rectangular?: boolean
}
```

## Plugin API

### `getAvatarCellBackground`

```ts
export function getAvatarCellBackground(index = 0);
```

---

### `getAvatarInitials`

```ts
export function getAvatarInitials(value: unknown);
```

---

### `getAvatarIndex`

```ts
export function getAvatarIndex(value: unknown);
```

---

### `avatarTemplate`

```ts
export function avatarTemplate(h: any, options: AvatarTemplateOptions =;
```

---

### `AvatarTemplateOptions`

```ts
export type AvatarTemplateOptions = {
  ariaLabel?: string;
  className?: string;
  index?: number;
  initials?: string;
  key?: string | number;
  label?: string;
  rectangular?: boolean;
  size?: number;
  style?: Record<string, string | number | null | undefined>;
  value?: unknown;
};
```

---

### `AVATAR_CELL_BACKGROUNDS`

```ts
AVATAR_CELL_BACKGROUNDS: readonly ["linear-gradient(135deg, #7dd3fc, #2563eb)", "linear-gradient(135deg, #facc15, #b45309)", "linear-gradient(135deg, #f9a8d4, #be185d)", "linear-gradient(135deg, #a5b4fc, #4f46e5)", "linear-gradient(135deg, #86efac, #15803d)", "linear-gradient(135deg, #fda4af, #be123c)", "linear-gradient(135deg, #c4b5fd, #7c3aed)", "linear-gradient(135deg, #fdba74, #c2410c)"];
```

---

### `avatarRenderer`

```ts
avatarRenderer: CellTemplate<DataType<any, ColumnProp>> | undefined;
```

---

### `avatarWithTextRenderer`

```ts
avatarWithTextRenderer: CellTemplate<DataType<any, ColumnProp>> | undefined;
```
