Convert Figma components to React components using Subzero Design System and Material-UI (MUI).
- Transform Figma elements to Subzero/MUI React components
- Preserve styles and component variants
- Support for basic components (Button, Typography, Box, Stack)
- Auto-mapping of Figma styles to MUI style props
- Hot reload support for development
- TypeScript support
- Node.js – v20
- Figma desktop app
- Clone this repository:
git clone https://github.com/yourusername/figma-subzero-plugin.git
cd figma-subzero-plugin
- Install dependencies:
npm install
- Build the plugin:
npm run build
- In Figma desktop app:
- Go to Plugins > Development > Import plugin from manifest
- Select the
manifest.json
file from this project
# Watch mode with hot reload
npm run watch
# Production build
npm run build
# Lint code
npm run lint
- Use
console.log
statements for debugging - Access developer console in Figma via Quick Actions:
Show/Hide Console
- Check build output in
build/
directory - Monitor hot reload logs in terminal
Current supported mappings:
- Figma Rectangle → MUI Box
- Figma Text → MUI Typography
- Figma Group → MUI Stack
- Figma Component Instance → MUI Button
figma-subzero-plugin/
├── src/
│ ├── main.ts # Plugin main logic
│ ├── ui.tsx # Plugin UI components
│ ├── types.ts # TypeScript definitions
│ └── utils/ # Utility functions
├── build/ # Build output (gitignored)
├── manifest.json # Plugin manifest
└── package.json # Project dependencies
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'feat: Add some amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
MIT
This plugin is built with Create Figma Plugin.
- Node.js – v20
- Figma desktop app
To build the plugin:
$ npm run build
This will generate a manifest.json
file and a build/
directory containing the JavaScript bundle(s) for the
plugin.
To watch for code changes and rebuild the plugin automatically:
$ npm run watch
- In the Figma desktop app, open a Figma document.
- Search for and run
Import plugin from manifest…
via the Quick Actions search bar. - Select the
manifest.json
file that was generated by thebuild
script.
Use console.log
statements to inspect values in your code.
To open the developer console, search for and run Show/Hide Console
via the
Quick Actions search bar.
Official docs and code samples from Figma: