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

# getButtonState

> Get whether a plugin button is enabled.

When a plugin button is enabled, it is shown in the toolbar/lasso toolbar/text-selection toolbar. When disabled, the corresponding button is not shown.

```ts theme={null}
getButtonState(id: number): Promise<boolean>;
```

**Returns**

* `Promise<boolean>`: button state, `true` enabled, `false` disabled

## Example

```ts wrap theme={null}
import { PluginManager } from 'sn-plugin-lib';

/**
 * Example: get button state.
 */
export async function exampleGetButtonState() {
 const enabled = await PluginManager.getButtonState(1);
 return enabled;
}
```
