What is Figmagic?
mainFigmagic is a command-line tool designed to bridge the gap between design and development by automating the extraction of design assets from Figma. It performs three primary functions:
- Output Design Tokens: Generates platform-agnostic JSON or JavaScript (TS, JS, MJS) tokens (e.g., colors, spacing) to decouple design choices from hard-coded implementation.
- Output Graphics: Automatically exports graphics as PNG, SVG, or React components with inlined SVGs.
- Generate React Components: Creates React components from Figma components that follow a specific formal structure, reducing boilerplate for low-level UI elements.
Figmagic is lightweight (~45kb compressed), has no external dependencies, and is designer-driven, treating Figma as the single source of truth.