A powerful Figma plugin that automatically exports design tokens (strings, colors & typography) to GitHub repositories with support for Android, iOS, Flutter, and Kotlin Multiplatform projects.
- π± Multi-Platform Support: Export to Android XML, iOS Localizable.strings, and Flutter ARB
- π 30+ Languages: Built-in support for major world languages
- π Multi-Mode Variables: Export all language modes in one click
- π€ Android: XML
colors.xml+ Jetpack ComposeColor.kt - π iOS: UIKit/SwiftUI color extensions with hex initializers
- π¦ Flutter: Dart color constants with
Color.fromARGB() - π― Full RGBA Support: Alpha channel with hex conversion
- π€ Android Compose:
Typography.ktwith TextStyle definitions - π iOS: UIFont/SwiftUI Font extensions
- π¦ Flutter:
TextStyleconstants with font weights and sizes - π Comprehensive: Includes fontSize, fontWeight, letterSpacing, lineHeight
- π Automated PR Creation: Creates pull requests automatically
- πΎ Settings Persistence: Save your configuration for quick exports
- βοΈ Highly Configurable: Customize paths, branches, PR templates
- π Secure: Uses GitHub Personal Access Tokens
Search for "Design System Sync" in the Figma Community plugins.
Direct Link: Design System Sync on Figma Community
- Clone this repository:
git clone https://github.com/ZeyadAbdullah679/design-system-sync.git
cd design-system-sync- Install dependencies:
npm install- Build the plugin:
npm run build- Import to Figma:
- Open Figma Desktop
- Go to
PluginsβDevelopmentβImport plugin from manifest - Select the
manifest.jsonfile from this project
Create string variables in Figma with different modes for each language:
Collection: "App Strings"
βββ Mode: English (default)
βββ Mode: Arabic
βββ Mode: Spanish
Variables:
βββ app_title = "My App" / "ΨͺΨ·Ψ¨ΩΩΩ" / "Mi App"
βββ welcome_message = "Welcome!" / "Ω
Ψ±ΨΨ¨Ψ§!" / "Β‘Bienvenido!"
βββ button_continue = "Continue" / "Ω
ΨͺΨ§Ψ¨ΨΉΨ©" / "Continuar"
Create color variables in Figma:
Collection: "Brand Colors"
βββ Mode: Default
Variables:
βββ primary = #6200EE
βββ primary_dark = #3700B3
βββ secondary = #03DAC6
βββ background = #FFFFFF
βββ error = #B00020
βββ surface = #F5F5F5
Create text styles in Figma with your typography system:
Text Styles:
βββ Headline Large (32pt, Bold)
βββ Headline Medium (24pt, SemiBold)
βββ Body Large (16pt, Regular)
βββ Body Medium (14pt, Regular)
βββ Label Small (12pt, Medium)
βββ Caption (10pt, Regular)
-
Get a GitHub Personal Access Token:
- Go to GitHub β Settings β Developer settings β Personal access tokens
- Click "Generate new token (classic)"
- Select scope:
repo(Full control of private repositories) - Copy the token (starts with
ghp_)
-
In the plugin, enter:
- GitHub Username
- Repository Name
- Base Branch (main/development)
- Personal Access Token
-
Click "Test" to verify connection
-
Click "Save" to persist settings
Select what you want to export:
- β Strings: Localization strings for multi-language support
- β Colors: Design tokens for consistent theming
- β Fonts: Typography styles for text consistency
- Select platforms: Android, iOS, and/or Flutter
- Customize file paths (defaults work for most projects)
- Click "Load Variables from Figma"
- Review the stats
- Click "Export to GitHub"
- Review the automated pull request! π
Strings XML:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_title">My App</string>
<string name="welcome_message">Welcome!</string>
</resources>Colors XML:
<?xml version="1.0" encoding="utf-8"?>
<resources>
lor name="primary">#FF6200EE</color>
lor name="secondary">#FF03DAC6</color>
</resources>Compose Colors:
package com.example.theme
import androidx.compose.ui.graphics.Color
val Primary = Color(0xFF6200EE)
val Secondary = Color(0xFF03DAC6)Compose Typography:
package com.example.theme
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
val HeadlineLarge = TextStyle(
fontSize = 32.sp,
fontWeight = FontWeight(700),
lineHeight = 40.sp
)Localizable.strings:
/* Localization strings generated from Figma */
"app_title" = "My App";
"welcome_message" = "Welcome!";SwiftUI Colors:
import SwiftUI
extension Color {
static let primary = Color(hex: "#6200EE")
static let secondary = Color(hex: "#03DAC6")
}SwiftUI Typography:
import SwiftUI
extension Font {
static let headlineLarge = Font.system(size: 32, weight: .bold)
static let bodyMedium = Font.system(size: 14, weight: .regular)
}ARB Strings:
{
"@@locale": "en",
"app_title": "My App",
"welcome_message": "Welcome!"
}Dart Colors:
import 'package:flutter/material.dart';
class AppColors {
static const Color primary = Color.fromARGB(255, 98, 0, 238);
static const Color secondary = Color.fromARGB(255, 3, 218, 198);
}Dart Typography:
import 'package:flutter/material.dart';
class AppTextStyles {
static const TextStyle headlineLarge = TextStyle(
fontSize: 32,
fontWeight: FontWeight.w700,
height: 1.25,
);
}- Strings:
shared/src/commonMain/composeResources/{lang}/strings.xml - Colors XML:
shared/src/commonMain/composeResources/values/colors.xml - Compose Colors:
shared/src/commonMain/kotlin/theme/Color.kt - Typography:
shared/src/commonMain/kotlin/theme/Typography.kt
- Strings:
{lang}.lproj/Localizable.strings - Colors:
Shared/Theme/Colors.swift - Typography:
Shared/Theme/Typography.swift
- Strings:
lib/l10n/app_{lang}.arb - Colors:
lib/theme/app_colors.dart - Typography:
lib/theme/app_text_styles.dart
Note: All paths are fully customizable!
Built-in mappings for 30+ languages including:
English, Arabic, Spanish, French, German, Italian, Portuguese, Russian, Chinese, Japanese, Korean, Dutch, Polish, Turkish, Swedish, Norwegian, Danish, Finnish, Greek, Hindi, Thai, Vietnamese, Indonesian, Malay, Czech, Hungarian, Romanian, Ukrainian, and more.
- "Failed to get base branch": Verify branch name and token permissions
- "Connection failed": Check token validity and internet connection
- "Path does not exist": Create folder structure first or adjust paths
- Strings paths must include
{lang}placeholder
- "No variables found": Create variables/text styles in Figma first
- Typography requires Text Styles (not just text layers)
npm install # Install dependencies
npm run build # Build for production
npm run watch # Build with watch mode
npm run clean # Clean build artifacts
npm test # Run tests
npm run test:coverage # Run tests with coverageThe plugin includes a comprehensive test suite with 60+ tests covering:
- String parsing (Android XML, iOS Strings, Flutter ARB)
- Color conversion and generation
- Typography generation
- GitHub API integration
- Edge cases and error handling
Run tests with:
npm testSet DEBUG_MODE = true in both code.ts and ui.html to enable console logging.
- β¨ NEW: Flutter platform support (ARB, Dart colors, TextStyle)
- β¨ NEW: Typography/Font Styles export for all platforms
- β¨ NEW: Extract text styles from Figma
- π¨ Enhanced UI with 3 export types
- π¦ Complete Flutter integration
- π§ͺ Comprehensive test suite with 60+ tests
- π§ Better type handling for Figma API objects
- β¨ NEW: Color variables support
- β¨ NEW: Android Compose & iOS color extensions
- π¨ Renamed to "Design System Sync"
- π Initial release with string export
- Issues: GitHub Issues
- Plugin: Figma Community
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ for the multi-platform development community.