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

# unregisterButton

> Unregister a plugin button.

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

**Parameters**

| Parameter | Type     | Description                                               |
| --------- | -------- | --------------------------------------------------------- |
| `id`      | `number` | Button ID (the `id` you used when registering the button) |

**Returns**

* `Promise<boolean>`: whether the button was unregistered successfully

## Example

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

/**
 * Example: unregister a button.
 */
export async function exampleUnregisterButton() {
 const ok = await PluginManager.unregisterButton(1);
 return ok;
}
```
