# Interface: ToolbarButton

[Mobile Document Scanner API Reference](../index.md) / ToolbarButton

# Interface: ToolbarButton

Defined in: [src/views/utils/types.ts:231](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L231)

Interface defining toolbar button properties and behavior.

## Remarks

Used internally to create toolbar buttons. Customize via [ToolbarButtonConfig](../type-aliases/ToolbarButtonConfig.md).

## Properties

### className?

> `optional` **className?**: `string`

Defined in: [src/views/utils/types.ts:264](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L264)

Additional CSS class name to apply to the button element.

***

### icon

> **icon**: `string`

Defined in: [src/views/utils/types.ts:243](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L243)

Path or data URL to the button icon image.

***

### id

> **id**: `string`

Defined in: [src/views/utils/types.ts:237](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L237)

Unique identifier for the button.

***

### isDisabled?

> `optional` **isDisabled?**: `boolean`

Defined in: [src/views/utils/types.ts:272](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L272)

Flag indicating whether the button is disabled (non-interactive).

#### Default Value

```ts
false

@public
```

***

### isHidden?

> `optional` **isHidden?**: `boolean`

Defined in: [src/views/utils/types.ts:280](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L280)

Flag indicating whether the button is hidden from the toolbar.

#### Default Value

```ts
false

@public
```

***

### label

> **label**: `string`

Defined in: [src/views/utils/types.ts:249](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L249)

Text label displayed below the button icon.

***

### onClick?

> `optional` **onClick?**: () => `void` \| `Promise`\<`void`\>

Defined in: [src/views/utils/types.ts:258](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/utils/types.ts#L258)

Click handler function invoked when the button is clicked.

#### Returns

`void` \| `Promise`\<`void`\>

#### Remarks

This handler can be synchronous or asynchronous. When provided through [ToolbarButtonConfig](../type-aliases/ToolbarButtonConfig.md), it overrides the button's default behavior.
