Skip to main content

New TS lib: Figma Messaging (postMessage() replacement)


davestewart

Hey folks,

I’ve released a messaging library for Figma plugin developers called Figma Messaging.

It’s s a two-way, await-able and type-safe replacement for Figma’s Messaging API which lets you do nice things like declare named handlers, call handlers by path, wait for a response, do something with that data, catch errors, etc:

example

It has a simple but powerful API, and for TypeScript developers, additional opt-in auto-completion functionality for:

handler ids:

handler parameters:

handler responses:

Figma Messaging provides robust messaging capabilities for any Figma Plugin with a build step.

You can take a look below, or install direct from NPM:

Happy to answer any questions!

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings