> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PluginButton

> PluginButton data structure.

`PluginButton` describes a plugin button that can be registered to the toolbar, lasso toolbar, or text-selection toolbar.

```ts theme={null}
type PluginButton = {
 id: number;
 name: string;
 icon: string;
 showType?: number;
 editDataTypes?: number[];
};
```

## Fields

| Field           | Type       | Description                                                                                                                          |
| --------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `id`            | `number`   | Button ID (must be unique within the plugin)                                                                                         |
| `name`          | `string`   | Button name                                                                                                                          |
| `icon`          | `string`   | Button icon path (absolute path or URI)                                                                                              |
| `showType`      | `number`   | Show type: `0` do not show plugin UI, `1` show plugin UI (default `1`)                                                               |
| `editDataTypes` | `number[]` | Lasso data type array (only required for lasso toolbar buttons). The button is shown only when the lasso selection matches this list |

## editDataTypes value

| Value | Meaning            |
| ----- | ------------------ |
| `0`   | handwritten stroke |
| `1`   | title              |
| `2`   | image              |
| `3`   | text               |
| `4`   | link               |
| `5`   | geometry           |
