Skip to content

wpmetcom/figmakit

Repository files navigation

Figma Plugin - Vite + React

A Figma plugin template using Vite and React with TypeScript.

Setup

npm install

Development

npm run dev

This will:

  • Start Vite dev server for the UI with hot reload
  • Watch and rebuild plugin code on changes

Build

npm run build

This creates production builds in the dist/ folder.

How to Use in Figma

  1. Open Figma Desktop App
  2. Go to PluginsDevelopmentImport plugin from manifest...
  3. Select the manifest.json file from this project
  4. Run the plugin from PluginsDevelopmentMy Figma Plugin

Project Structure

src/
  ├── plugin/          # Plugin sandbox code (runs in Figma)
  │   └── code.ts
  ├── ui/              # React UI (runs in iframe)
  │   ├── App.tsx
  │   ├── App.css
  │   └── main.tsx
  └── types/           # Shared types
      └── messages.ts

Communication

The plugin uses postMessage API:

  • UI → Plugin: parent.postMessage({ pluginMessage: {...} }, '*')
  • Plugin → UI: figma.ui.postMessage({...})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors