Messaging library for Figma plugin developers
Example of processing spinner in Figma Variables Starter.
Figma Messaging is a two-way, await-able and type-safe replacement for Figma's Messaging API.
It has a simple but powerful API and can be used in both main
and ui
processes:
// actions
const handlers = {
create () { ... },
update () { ... },
...
}
// incoming
const bus = makeBus(handlers)
// outgoing
bus.call('fooify', 'foo', 123, true)
Additionally, TypeScript users can opt-in to full auto-complete functionality, including:
handler ids:
handler parameters:
handler responses:
Figma Messaging provides robust messaging capabilities for any Figma Plugin with a build step.