# media.person

Identifies a person: their photo, or initials when there is none

Component: [`<Media>`](https://www.prongs.dev/docs/components/media.md) · Renders: `<img>` · Profile: [UI](https://www.prongs.dev/docs/intents/ui.md)

## Example

```tsx
<Media intent="media.person" src={user.avatarUrl} alt={user.name} />
```

## Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

| If it is for… | Use |
|---|---|
| Identifies a person: their photo, or initials when there is none | `media.person` (this page) |
| An image that illustrates content | [`media.image`](https://www.prongs.dev/docs/intents/media/image.md) |

## Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

- Built from: [`frame.round`](https://www.prongs.dev/docs/intents/ui.md#frame-round)

## For registry authors

**Starter intents.** These are the intents `prongs add` puts in your registry, shown in this site’s theme. Yours are your own `registry.ts`: rename, restyle and add to them, and see them with `prongs add gallery`.

What this intent is built from and its entry in `components/prongs/registry.ts`. You only need this to change how it looks or to add an intent like it.

How media.person resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

- [`frame.round`](https://www.prongs.dev/docs/intents/ui.md#frame-round) — Small circle; centres initials when there is no image

  ```
  inline-flex h-8 w-8 shrink-0 items-center justify-center
  overflow-hidden rounded-full bg-muted object-cover text-xs
  text-muted-foreground
  ```

- `media.person` (this page) — Identifies a person: their photo, or initials when there is none

Final classes

```
inline-flex h-8 w-8 shrink-0 items-center justify-center
overflow-hidden rounded-full bg-muted object-cover text-xs
text-muted-foreground
```

Definition

```ts
'media.person': {
  kind: 'semantic',
  description: 'Identifies a person: their photo, or initials when there is none',
  refs: ['frame.round'],
  notFor: [
    { context: 'an image that illustrates content', instead: 'media.image' },
  ],
},
```
