This is a preset for creating Figma plugins using React, Tailwind CSS v4, and esbuild. The starter kit is based on the esbuild-react sample provided by Figma.
- Runtime: Bun
- Framework: React 18
- Styling: Tailwind CSS v4
- Build: Vite + esbuild
- Linting/Formatting: Biome
- Bun (v1.0 or higher)
- Clone this repository
- Navigate into the project directory:
cd figma-plugin-starter - Install dependencies:
bun install
To start the development server, run:
bun devThis command will start the following processes concurrently:
tsc- TypeScript compiler in watch mode for both the main code and UI codebuild- esbuild bundler for the main code in watch modevite- development server for the UI code with HMR (hot module replacement)
Once the server is up and running, open Figma and navigate to Plugins > Development > Create new plugin. Choose "Link existing plugin" and select the manifest.json file in the project directory.
To build the plugin, run:
bun run buildThis command will create a production-ready version of the plugin in the dist directory.
bun run lint # Check for issues
bun run lint:fix # Fix issues automaticallyThis project is licensed under the MIT License. See the LICENSE file for more details.