All Projects → PluginFinchy → Figma-Vue3-Template

PluginFinchy / Figma-Vue3-Template

Licence: MIT License
Plugin template for Figma using Vue3

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Vue
7211 projects

Projects that are alternatives of or similar to Figma-Vue3-Template

figma-plugins-stats
📈 A CLI to get live and historical stats for your Figma plugins
Stars: ✭ 53 (+178.95%)
Mutual labels:  figma, figma-plugins
React Figma
⚛️ A React renderer for Figma
Stars: ✭ 1,830 (+9531.58%)
Mutual labels:  figma, figma-plugins
figma-walker
Walkthrough your project without lifting your keyboard / Figma Plugin
Stars: ✭ 45 (+136.84%)
Mutual labels:  figma, figma-plugins
figma-plus-advanced-rename-plugin
A better and more powerful batch rename plugin for Figma with a dozen of options
Stars: ✭ 28 (+47.37%)
Mutual labels:  figma, figma-plugins
figma-api-stub
🤖 A stub implementation of Figma Plugins API.
Stars: ✭ 33 (+73.68%)
Mutual labels:  figma, figma-plugins
figma-dev
Build figma plugins with a modern toolchain
Stars: ✭ 15 (-21.05%)
Mutual labels:  figma, figma-plugins
Figmatocode
Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI.
Stars: ✭ 2,299 (+12000%)
Mutual labels:  figma, figma-plugins
Figma-Plugin-Webpack-React-Template
Base for building Figma plugins with React
Stars: ✭ 16 (-15.79%)
Mutual labels:  figma, figma-plugins
figma-messenger
Type-safe communication for good 🧐.
Stars: ✭ 24 (+26.32%)
Mutual labels:  figma, figma-plugins
mdn-dinocons
A scalable set of icons for use across Mozilla Developer websites
Stars: ✭ 21 (+10.53%)
Mutual labels:  figma
figma-tailwindcss
A plugin that tries to bridge the gap between designs and code. Figma tailwindcss lets you export aspects of a design made in Figma to a javascript theme file that you can import into your tailwindcss config
Stars: ✭ 63 (+231.58%)
Mutual labels:  figma
Friday
🎓 Friday - Your Personal Class Manager Assistant, It'll never let you miss another assignment deadline or upcoming test.
Stars: ✭ 67 (+252.63%)
Mutual labels:  figma
figma-plugin-helpers
A collection of useful helper functions to import to your Figma plugin project
Stars: ✭ 161 (+747.37%)
Mutual labels:  figma
figma-import-plugin
A plugin for Android Studio to import figma resources
Stars: ✭ 24 (+26.32%)
Mutual labels:  figma
figma-api
Figma REST API implementation with TypeScript, Promises & ES6
Stars: ✭ 126 (+563.16%)
Mutual labels:  figma
FigmaPy
An unofficial Python3+ wrapper for Figma API
Stars: ✭ 19 (+0%)
Mutual labels:  figma
awesome-flutter-ui
10+ flutter(android, ios) UI design examples ⚡ - login, books, profile, food order, movie streaming, walkthrough, widgets
Stars: ✭ 848 (+4363.16%)
Mutual labels:  figma
styled-system-figma
Generate theme.js from Figma file
Stars: ✭ 26 (+36.84%)
Mutual labels:  figma
iconoir
A Simple and Definitive Open-Source Icons Library
Stars: ✭ 2,429 (+12684.21%)
Mutual labels:  figma
phinger-cursors
Most likely the most over engineered cursor theme.
Stars: ✭ 332 (+1647.37%)
Mutual labels:  figma

Vue 3 Plugin Template for Figma

This template gets you up and running and building figma plugins with the Vue3 framework in a short time.

Features:

  • Vue
  • Typescript
  • figma-plugin-ds integration
  • Message handler helper functions to simplify communication between the main code and the UI code. (Thanks to @jackiecorn)
  • Live Server preview to make building UIs faster. npm run preview

This template is built on top of @jackiecorn/Vue-Plugin-Template and updated to use Vue3

Downloading the template

There are a few ways you can use this template.

The simplest way is to hit 'use this template'

Or download the .zip of this repo.

Alternatively you can use this template as a template for your own github repo through the github cli

gh repo create "<YOUR REPO NAME>" -p "https://github.com/LukeFinch/Figma-Vue3-Template"

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].