Tools & Capabilities

dshelperplugin

snak10/dshelperplugin · ★ 0

snak10

1. Open Figma Desktop app 2. Open any file 3. Right-click on the canvas 4. Select Development Import plugin from manifest 5. Navigate to the plugin folder 6. Select manifest.json

License
MIT
Added
2026-08-23
Maintenance
stale
Install kind
github

No manifest check is available; listing does not imply compatibility or security review.

安装

dsh plugin --profile web add github:snak10/dshelperplugin

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

  1. Open Figma Desktop app
  2. Open any file
  3. Right-click on the canvas
  4. Select Development > Import plugin from manifest
  5. Navigate to the plugin folder
  6. Select manifest.json

Features:

  • Vue
  • Typescript
  • figma-plugin-ds integration
  • Message handler helper functions to simplify communication between the main code and the UI code

How to use?

  1. Install dependencies with npm i.
  2. Run npm run dev and a folder named dist will be created.
  3. In the Figma desktop app, click on Create new plugin / Link existing plugin and point it to the manifest.json in this project.
  4. Now you can edit the main Figma code from src/code.ts and the UI code from src/ui.vue. Hitting save will auto-reload the build so you can see your changes right away.
  5. When you're ready to publish the plugin, run npm run build to create a production build.

Message handlers

To communicate between the main code and the UI code, you can use the dispatch and handleEvent functions to send and listen to messages between the two environments.

Sending a message from the main code to UI code:

dispatch('eventName', data)

Handling messages from the UI code to the main code:

handleEvent('eventName', data => {
    // Do something with the data
})

Note that data is optional so you could simply send a message by dispatch('eventName').

In the vue UI code, dispatch can be called anywhere, but handleEvent functions should be called in mounted() so they would only be called first and only once.

This project template shows an example of a UI button sending a message to the main code to create a rectangle node. The main code then sends back the created node ID to be displayed in the UI.