Figma to WordPress Theme Converter β Turn any Figma design into a fully functional WordPress theme with Elementor support, WooCommerce compatibility, and production-ready code.
- π Figma API Integration β Full REST API client with rate limiting, retry logic, caching, and webhook support
- π― Automatic Component Detection β Identifies 20+ component types (header, hero, product cards, testimonials, forms, galleries, etc.)
- π¨ Design Token Extraction β Extracts colors (50β900 shade scale), typography, spacing, shadows, border-radius, breakpoints, and transitions from Figma variables and styles
- π» Multi-Format Code Generation β HTML/CSS, Tailwind v4
@theme, WordPresstheme.json, DTCG tokens, WP block patterns/templates - π¦ Elementor Mapper β Generates complete Elementor JSON (containers, global settings, 50+ section templates)
- ποΈ WordPress Theme Builder β Produces 58+ theme files:
style.css,functions.php, templates, patterns, WooCommerce templates, Customizer settings - βοΈ Configuration Layer β WordPress Customizer with sections for colors, typography, layout, social links, and WooCommerce shop settings
- π WooCommerce Integration β Auto-detects e-commerce projects, generates Cart/Checkout/My Account templates, product cards with gallery/badge/rating/wishlist
- β Built-in Validator β Checks PHP syntax, WordPress coding standards, WCAG AA contrast ratios, CSS quality, Elementor structure, accessibility
- π¦ Package & Export β Generates
screenshot.png(880Γ660),demo-content.xml(WXR),readme.txt,robots.txt, and ZIP archive - π₯οΈ REST API β Express server with 5 endpoints for headless integration
- π CLI Tool β Single
generatecommand for CI/CD pipelines
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Figma Design URL β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. Fetch & Analysis (figma-client) β
β ββ JSON + Metadata + Variables + Styles β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 2. Component Detection (analyzer) β
β ββ 20+ component types, project type classification β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. Token Extraction (analyzer) β
β ββ Colors, Typography, Spacing, Shadows, Breakpoints β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. Code Generation (code-generator) β
β ββ HTML/CSS + Tailwind + theme.json + DTCG + Blocks β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 5. Elementor Mapping (elementor-mapper) β
β ββ JSON containers + global settings + templates β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 6. Theme Structure (theme-builder) β
β ββ 58+ WP theme files + Customizer + Admin panel β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 7. Validation (validator) β
β ββ PHP syntax / WCAG / CSS / Elementor / WP stds β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 8. Package & Export (CLI / API) β
β ββ ZIP + screenshot.png + demo-content.xml + README β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββ
β WordPress Theme (.zip) β
β + Elementor Import Ready β
βββββββββββββββββββββββββββββββ
| Package | Description | Status |
|---|---|---|
@typefigma/figma-client |
Figma REST API client with rate limiting & caching | β 85% |
@typefigma/analyzer |
Component detection, token extraction, layout engine | β 90% |
@typefigma/code-generator |
HTML/CSS, Tailwind, theme.json, DTCG, WP blocks | β 85% |
@typefigma/elementor-mapper |
Elementor JSON containers & 50+ templates | β 80% |
@typefigma/theme-builder |
WordPress file builder, Customizer, Admin panel | β 90% |
@typefigma/validator |
PHP syntax, WCAG, CSS, Elementor, WP standards | β 90% |
@typefigma/cli |
Command-line interface | β 70% |
@typefigma/api |
Express REST API | β 70% |
- Runtime: Node.js β₯ 18, TypeScript 5.x (strict mode, NodeNext modules)
- Pipeline: 8 monorepo packages (npm workspaces)
- Build: TypeScript compiler (
tsc), Vitest for testing - Key Libraries:
archiver(ZIP),zlib(PNG), Express (API), Commander (CLI) - Output Formats: HTML5, CSS3, Tailwind v4
@theme,theme.json(FSE), DTCG tokens, WXR (WordPress eXtended RSS), Elementor JSON - Testing: 504 tests across 5 packages
- Node.js β₯ 18
- A Figma access token
git clone https://github.com/Hordekiller/TypeFigma.git
cd TypeFigma
npm install
npm run build# Generate a theme from a Figma URL
npx typefigma generate "https://www.figma.com/file/abc123/design" \
--token "figd_xxxxx" \
--name "My Theme" \
--output "./my-theme" \
--zip# Start the API server
npx tsx packages/api/src/index.ts
# Analyze a Figma design
curl -X POST http://localhost:3001/api/analyze \
-H "Content-Type: application/json" \
-d '{
"figmaUrl": "https://www.figma.com/file/abc123/design",
"figmaToken": "figd_xxxxx"
}'
# Generate a full theme
curl -X POST http://localhost:3001/api/generate \
-H "Content-Type: application/json" \
-d '{
"figmaUrl": "https://www.figma.com/file/abc123/design",
"figmaToken": "figd_xxxxx",
"themeName": "My Theme",
"createZip": true
}'
# Download the generated ZIP
curl -o theme.zip http://localhost:3001/api/download/my-themenode scripts/demo.mjsGenerates a complete e-commerce WordPress theme at ./output/shopdemo/ with 58 files, Elementor templates, WooCommerce support, and validation report.
theme-name/
βββ style.css # Theme metadata + WordPress header
βββ functions.php # Theme setup, enqueue, Elementor integration
βββ index.php # WordPress entry point
βββ screenshot.png # 880Γ660 theme screenshot
βββ readme.txt # WordPress.org-compatible readme
βββ robots.txt # SEO crawl rules
βββ demo-content.xml # WXR import file (pages, products, menus)
βββ theme.json # Full Site Editing configuration
βββ header.php / footer.php # Site chrome
βββ page.php / single.php # Content templates
βββ archive.php / search.php # List templates
βββ 404.php / sidebar.php # Utility templates
βββ inc/
β βββ customizer.php # Color, typography, layout, WooCommerce settings
β βββ elementor-widgets.php # Custom Elementor widget registration
β βββ fonts.php # Google Fonts enqueue
β βββ admin/settings.php # Theme admin panel
βββ assets/
β βββ css/global.css # CSS custom properties + base styles
β βββ css/components.css # Component-specific styles
β βββ css/woocommerce.css # Shop styles
β βββ js/theme.js # Theme JavaScript
βββ elementor/
β βββ global-settings.json # Elementor global colors, fonts, breakpoints
β βββ templates/ # Header, Footer, Product Archive JSON
βββ patterns/ # Block patterns (hero, products, testimonials)
βββ templates/ # Block templates (page, archive, cart)
βββ woocommerce/ # Cart, Checkout, My Account, Archive, Single
βββ styles/ # Style variations (default, light, dark)
# Setup
npm install
npm run build
# Run all tests (504 tests across 5 packages)
npm test
# Type-check all packages
npm run typecheck
# Development (watch mode)
npm run dev
# Clean build artifacts
npm run clean# Work on a specific package
cd packages/core/theme-builder
npx vitest run # Run tests
npx tsc --noEmit --watch # Type-check in watch modeTypeFigma automatically detects the project type using 13 indicators:
| Indicator | Description |
|---|---|
hasProductCards |
Product grid/list with add-to-cart |
hasAddToCart |
Individual add-to-cart buttons |
hasCheckout |
Checkout forms/sections |
hasWishlist |
Wishlist/bookmark functionality |
hasProductGallery |
Image galleries with thumbnails |
hasReviews |
Customer review sections |
hasPricing |
Pricing tables/cards |
hasBlogPosts |
Blog post listings |
hasPortfolioItems |
Portfolio/project grids |
hasContactForms |
Contact form sections |
hasTeamSection |
Team member grids |
hasServicesSection |
Service/feature cards |
Detected types: ecommerce | corporate | blog | portfolio | landing | saas
Every generated theme runs through a comprehensive validation suite:
| Check | What It Validates |
|---|---|
| Structure | 11 required WordPress theme files present |
| PHP Syntax | Tag balance, curly brace matching, function declaration correctness |
| WP Standards | Escaping functions, i18n, nonces, hooks, superglobal sanitization |
| Accessibility | Alt text on images, form labels, ARIA roles, heading hierarchy, WCAG AA contrast (4.5:1) |
| CSS Quality | Specificity, duplicate selectors, vendor prefixes, !important usage |
| Elementor | Widget registration, global settings, template JSON validity |
| Performance | File sizes, CSS/JS/PHP totals, image count, largest file |
Contributions are welcome! Please read our contributing guidelines before submitting a pull request.
- WooCommerce Cart/Checkout/My Account template improvements
- Web UI (Next.js) β live preview, component selection, progress display
- Additional Elementor Pro widget support (slides, forms, price lists)
- End-to-end testing with WordPress/Elementor
- CSS Module / CSS-in-JS output formats
GPLv2 or later β Free to use, modify, and distribute.
Built with β€οΈ for the WordPress community