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

# modifyLassoTitle

> Modify lasso title.

<Note>
  This API supports undo/redo in NOTE.

  This API modifies lasso document title data. Therefore, you must lasso a title before calling it,
  and the lasso selection must contain exactly one title. If the lasso selection is not a title, or contains
  multiple titles, the call will fail.
  It is recommended to call this API from the plugin UI entered via a lasso toolbar button.
</Note>

```ts wrap theme={null}
static modifyLassoTitle(params: { style: number }): Promise<APIResponse<boolean>>;
```

**Parameters**

| Parameter      | Type     | Description                                                                                     |
| -------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `params.style` | `number` | Title style: `0` remove title, `1` black background, `2` gray-white, `3` gray-black, `4` shadow |

**Returns**

* [`APIResponse<boolean>`](/en/api-reference/supernote-plugin/types/api-response):
  `result === true` indicates the modification succeeded

## Example

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

/**
 * Example: modify title style for the lasso-selected title.
 */
export async function exampleModifyLassoTitle() {
 const res = await PluginNoteAPI.modifyLassoTitle({ style: 2 });
 if (!res.success) {
 throw new Error(res.error?.message ?? 'modifyLassoTitle call failed');
 }
 return res.result;
}
```
