Skip to main content
Question

Support connecting Code Connect variables to local image assets

  • December 11, 2025
  • 0 replies
  • 6 views

Nayanika Goje

Currently, Figma Code Connect allows mapping design tokens, styles, and components to code, but it does not support connecting variables directly to local image assets.

 

Many projects maintain a set of local assets (e.g., illustrations, icons) in the codebase, often structured as an object for easy access: example asset.ts:

import BillsRecharges from "./assets/illustrations/Bills&Recharges.svg";
import UnionPay from "./assets/illustrations/UnionPay.svg";

export const illustrationIcons = {
  BillsRecharges,
  UnionPay,
} as const;

Developers then use these assets dynamically in code, e.g., illustrationIcons.BillsRecharges.

Currently, Code Connect cannot reference these local imports, so teams must manually map Figma components or variants to local assets, which is error-prone and time-consuming.

 

Proposed solution:  Allow Code Connect to link a Figma variable or component key to a local import path or predefined asset object.