compile_figma_component
Compile a Figma node JSON or Figma URL into Tailwind and variant-mapping context, resolving variants against your component library and writing code files.
Instructions
Compile a Figma node into a Tailwind + variant-mapping context. Accepts an offline figmaNode JSON or a figmaUrl (live Figma API). In BYOK mode the token bills the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Compile mode: flat compiles only the outer container; recursive compiles the whole subtree (default flat) | |
| figmaUrl | No | Figma design link (https://www.figma.com/design/FILEKEY/...?node-id=NODEID; use either this or figmaNode) | |
| siblings | No | Sibling node list, used to detect responsive breakpoints | |
| figmaNode | No | Figma node JSON exported offline (use either this or figmaUrl) | |
| figmaToken | No | Figma Personal Access Token (takes precedence over the FIGMA_ACCESS_TOKEN env var) | |
| projectRoot | No | Absolute path to the user's project root | |
| styleFormat | No | Output style format: tailwind/css-modules/scss/styled-components (default tailwind) | |
| localComponent | No | Local component metadata (name/importPath/variants) |