cljs-figma
Write Figma plugins with ClojureScript. Comes with a browser-based development environment for development without using Figma + all the bells and whistles of ClojureScript development.
Getting Started
-
Create new plugin inside Figma
-
Select "Figma Design" (we don't support FigJam just yet)
-
Select "Empty" so we get a barebones plugin to start with.
-
Delete the code.js
file that gets created automatically
-
Run npm init --force --yes
and adjust to your liking
-
Install cljs-figma
in the project with npm install --save-dev cljs-figma
-
Run npx cljs-figma-init
to create the basic directory structure
-
Inside the src/main
directory, there will now be two starter files, code.cljs
and ui.cljs
-
Run npx cljs-figma-dev
to start a in-browser development environment
-
Run npx cljs-figma-build
to build the Figma plugin
Expected directory structure
Two main files that are being used as entrypoints.
src/main/plugin/ui.cljs
is loaded as the UI code.src/main/plugin/code.cljs
is loaded in the background context.