A Figma plugin that bulk applies Variables to existing Text Styles with auto-matching capabilities and a custom React UI.
- Auto-matching: Automatically matches variables to text style properties by comparing values
- Manual override: Fine-tune variable assignments with a table interface
- Bulk updates: Apply variable bindings to multiple text styles at once
- Variable collections: Organize variables by property type (font, size, weight, etc.)
- CSV export: Export your text style data for auditing
- Modern UI: Built with React and TypeScript for a smooth user experience
- Node.js 16+
- npm or yarn
- Figma Desktop app
-
Clone or download this repository
git clone <repository-url> cd Variable-to-Text-Style-Manager
-
Install dependencies
npm install
-
Build the plugin
npm run build
-
Load the plugin in Figma
- Open Figma Desktop
- Go to Plugins → Development → Import plugin from manifest...
- Select the
manifest.jsonfile from this project - The plugin will appear in your plugins list
For development with hot reload:
npm run devThis will watch for changes and rebuild automatically.
src/
├── code.ts # Main plugin code (Figma API)
├── bridge.ts # IPC communication
├── figma-api.ts # Figma API interactions
├── matching.ts # Auto-matching logic
├── types.ts # Shared TypeScript types
└── ui/ # React UI
├── index.html # UI entry point
├── main.tsx # React app entry
├── App.tsx # Main app component
├── styles.css # Global styles
└── components/ # React components
├── VariableGroupPicker.tsx
├── StyleTable.tsx
├── CellSelector.tsx
├── Toast.tsx
└── EmptyState.tsx
- Open the plugin in a Figma file with text styles and variables
- Select variable collections for each property type (font family, size, weight, etc.)
- Review auto-matches - the plugin will automatically suggest variable matches
- Make manual adjustments using the table interface if needed
- Click "Update Styles" to apply all variable bindings
- Export CSV to audit your changes
- Font Family (string variables)
- Font Size (number variables)
- Font Weight (number variables)
- Line Height (number variables)
- Letter Spacing (number variables)
- Framework: React 18 + TypeScript
- Build tool: Vite
- IPC: Custom message bridge between UI and worker
- Styling: CSS with modern design system
- API: Latest Figma Variables API
- Ensure you've built the project with
npm run build - Check that
manifest.jsonpoints to the correct file paths - Verify Figma Desktop is up to date
- Make sure your file has variable collections
- Check that variables are published/available in the current file
- Verify variable values match text style property values exactly
- Check that you've selected the correct variable collection for each property
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details