# Interface AddToToolbarOpts

An instance of the frontend api available globally.

#### Global

#### Var

api

interface AddToToolbarOpts {
action : () => void;
icon : string;
id : string;
shortcut : string;
title : string;
}

- Defined in src/public/app/services/frontend_script_api.ts:36

##### Index

### Properties

action
icon
id
shortcut
title

## Properties

### action

action: () => void

callback handling the click on the button

- Defined in src/public/app/services/frontend_script_api.ts:39

### icon

icon: string

name of the boxicon to be used (e.g. "time" for "bx-time" icon)

- Defined in src/public/app/services/frontend_script_api.ts:44

### id

id: string

id of the button, used to identify the old instances of this button to be replaced ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.

- Defined in src/public/app/services/frontend_script_api.ts:42

### shortcut

shortcut: string

keyboard shortcut for the button, e.g. "alt+t"

- Defined in src/public/app/services/frontend_script_api.ts:46

### title

title: string

- Defined in src/public/app/services/frontend_script_api.ts:37