# IncomingCallCard

> Props, styling and a live IncomingCallCard example.

`IncomingCallCard` from `@polymorfa/react`. Choose props and styles above; the preview stays visible in every code view.

## Props

| Prop | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `displayName` | `string` | Optional | The number | Human name to show instead of the raw number, if the app knows one. |
| `avatarUrl` | `string` | Optional |  | Avatar image. |
| `resolveAvatar` | `AvatarResolver` | Optional |  | Resolves an avatar for a number. |
| `className` | `string` | Optional |  |  |
| `exclusive` | `boolean` | Optional | `false` | Claim the call when Answer is pressed, so other participants stop ringing and cannot join. Default `false`: others keep ringing and can join the answered call. |
| `resolveName` | `(peer: string) => string \| undefined` | Optional |  | Name for another waiting call in the "Other incoming calls" list. |
| `controller` | `CallsController` | Optional |  |  |
| `createController` | `() => CallsController` | Optional |  |  |

## Types

Named types used in the props above.

```ts @polymorfa/react
type AvatarResolver = (peer: string) => string | undefined | Promise<string | undefined>;
```

## Styling

Use `className`, `classNames` (a class for any [slot](https://docs.polymorfa.com/ui-kit/appearance#slots), typed `SlotClassNames`), appearance variables and element styles. The Style panel applies changes to the live component. See [Appearance](https://docs.polymorfa.com/ui-kit/appearance).

## Setup

Use [the provider and server route](https://docs.polymorfa.com/ui-kit/setup) for your application. The preview above uses local sample data and controllers. [Chat controllers](https://docs.polymorfa.com/ui-kit/chat#controllers) and [inbox data sources](https://docs.polymorfa.com/ui-kit/inbox#data-sources) keep your data separate from the UI.
