clintonhalpin / cra-template-figma-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cra-template-figmaplugin

Use create react app to build a Figma Plugin, supafast.

npm version

Here are some of the key differences beyond default cra-template

  • build: Figma plugins don't have access to file system so JS/CSS are inlined with inline-build.sh
  • post-install: Automatically setup your Figma plugin files
    • Plugin Manifest: Added files for creating your plugin manifest
    • Plugin file: Added plugin file to show plugin when run in figma

To use this template run the following

# Clone starter
npx create-react-app newPlugin --template cra-template-figma-plugin
# Copy files from src directory
cd newPlugin && ./src/post-install.sh
# build plugin
pnpm run build

To run this plugin in Figma

  1. Open figma file
  2. Select an element and right click select Plugins > Development > Import Plugin from manifest

For more information, please refer to:

About


Languages

Language:Shell 33.7%Language:HTML 33.4%Language:TypeScript 16.7%Language:CSS 16.2%