# ButtonControl

Canonical page: https://www.adaptabletools.com/docs/reference/buttoncontrol

A standard clickable button.

```ts title="TypeScript"
export interface ButtonControl<TData = any, CTX = ActionColumnContext<TData>> extends BaseControl<TData, CTX> 
```

###### Extends

[`BaseControl`](https://www.adaptabletools.com/docs/reference/basecontrol.md)`<TData, CTX>`

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [busyLabel](https://www.adaptabletools.com/docs/reference/buttoncontrol.md#busylabel) | `string` | Label shown while an async `onClick` is pending. |
| [confirm](https://www.adaptabletools.com/docs/reference/buttoncontrol.md#confirm) | [`ConfirmConfig`](https://www.adaptabletools.com/docs/reference/confirmconfig.md)`<CTX>` | Optional confirmation prompt shown before `onClick` runs. |
| [onClick](https://www.adaptabletools.com/docs/reference/buttoncontrol.md#onclick) | `(context: CTX) => void \| Promise<void>` | Handler invoked when the button is clicked. May return a `Promise`, in which<br/>case the button shows a busy/pending state and is disabled until it resolves. |
| [type](https://www.adaptabletools.com/docs/reference/buttoncontrol.md#type) | `'button'` | Discriminator. Set to `'button'`. |

## Property Details

### busyLabel

Label shown while an async `onClick` is pending.

```ts title="TypeScript"
busyLabel?: string;
```

###### Property Value

`string`

### confirm

Optional confirmation prompt shown before `onClick` runs.

```ts title="TypeScript"
confirm?: ConfirmConfig<CTX>;
```

###### Property Value

[`ConfirmConfig`](https://www.adaptabletools.com/docs/reference/confirmconfig.md)`<CTX>`

### onClick

Handler invoked when the button is clicked. May return a `Promise`, in which
case the button shows a busy/pending state and is disabled until it resolves.

```ts title="TypeScript"
onClick: (context: CTX) => void | Promise<void>;
```

###### Property Value

`(context: CTX) => void | Promise<void>`

### type

Discriminator. Set to `'button'`.

```ts title="TypeScript"
type: 'button';
```

###### Property Value

`'button'`
