# AvatarHeader

> Molecule — orn-ui

> ⚠️ Requires <UIProvider>: This component (like every orn-ui component) must render inside a <UIProvider> ancestor, or it throws at runtime. See https://orn-ui-docs.vercel.app/getting-started.md

> Runs on Expo SDK 54, 55, 56 and 57, and on bare React Native >=0.81 with react >=19.1. No native modules — works in Expo Go, no prebuild.

## Installation

Install just this component (copies the source into your project, no npm dependency)
```bash
npx orn-ui add avatar-header
```

Or install the whole package and import it
```tsx
pnpm add orn-ui
import { AvatarHeader } from 'orn-ui/avatar-header';
```

Depends on: core (theme + icons)

## Variants

### With initials

```tsx
<AvatarHeader initials="JD" title="Jane Doe" subtitle="Customer since 2023" />
```

### With icon

```tsx
<AvatarHeader iconName="check" title="Order confirmed" subtitle="#A-10492" />
```

### Custom iconColor

```tsx
<AvatarHeader iconName="info" iconColor="#00cae1" title="Account details" />
```

## Full demo source

```tsx
const variants: VariantDef[] = [
  { label: 'With initials', content: <AvatarHeader initials="JD" title="Jane Doe" subtitle="Customer since 2023" /> },
  { label: 'With icon', content: <AvatarHeader iconName="check" title="Order confirmed" subtitle="#A-10492" /> },
  { label: 'Custom iconColor', content: <AvatarHeader iconName="info" iconColor="#00cae1" title="Account details" /> },
];
return <VariantList variants={variants} />;
```

## Props

| Name | Type | Default | Description |
|---|---|---|---|
| `iconName?` | `IconName` | — | Icon shown inside the circle. If omitted, `initials` are used. |
| `iconColor?` | `string` | — | — |
| `initials?` | `string` | — | Short text (e.g. 2 letters) shown when `iconName` is not passed. |
| `title` | `string` | — | — |
| `subtitle?` | `ReactNode` | — | — |
| `style?` | `StyleProp<ViewStyle>` | — | — |
