# CallButton

> Props, styling and a live CallButton example.

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

## Props

| Prop | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `to` | `string` | Required |  | Phone number in E.164 form or a WhatsApp user ID. |
| `video` | `boolean` | Optional | `false` | Places a video call. |
| `session` | `string` | Optional | The grant's session | Session that places the call. Defaults to the grant's session. |
| `variant` | `"button" \| "icon"` | Optional | `"button"` | `icon` renders a round icon button, as in the inbox header. |
| `surface` | `boolean` | Optional | `true` | Render the call overlay after placing. Defaults to `true`. |
| `children` | `ReactNode` | Optional | Locale text | Button label. |
| `onError` | `(error: unknown) => void` | Optional |  | Called when placing fails. |
| `className` | `string` | Optional |  | Root class and slot classes. |
| `classNames` | `SlotClassNames` | Optional |  | Root class and slot classes. |

## 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.
