Skip to main content


Removes a callback added with figma.on or figma.once.


off(type: ArgFreeEventType, callback: () => void): void

off(type: 'run', callback: (event: RunEvent) => void): void

off(type: 'drop', callback: (event: DropEvent) => boolean): void

off(type: 'documentchange', callback: (event: DocumentChangeEvent) => void): void

off(type: 'textreview', callback: (event: TextReviewEvent) => Promise<TextReviewRange[]> | TextReviewRange[]): void


The callback needs to be the same object that was originally added. For example, you can do this:

Correct way to remove a callback
let fn = () => { console.log("selectionchanged") }
figma.on("selectionchange", fn)"selectionchange", fn)

whereas the following won't work, because the function objects are different:

Incorrect way to remove a callback
figma.on("selectionchange", () => { console.log("selectionchanged") })"selectionchange", () => { console.log("selectionchanged") })

On this page