Skip to main content
michael.g
New Member
Oct 26, 2026 9:07 AM UTC

let Code Connect read the resolved variable mode

Our components are themed with a variable collection, not with extra variants. The collection has four modes:

  • Personal light and personal dark are the consumer theme. Light is the normal surface. Dark is the inverted, brand-colored surface.
  • Business light and business dark are a separate business theme. Same two surfaces, different colors from personal.

A button has no Theme property. Type, size, and state stay the same. The mode is set on a parent frame and inherited, and the fills come from color variables. The same primary button looks different in each mode.

In code we have a matching theme value. Code Connect cannot emit it, because figma.selectedInstance only exposes component properties, nested instances, and text. There is no way to read the active mode.

The Plugin API already has this as resolvedVariableModes, including modes inherited from a parent. Please expose the same thing on the Code Connect instance, with the collection name and the mode name, so a template can set the theme.

Same request, already open:

Happy to share a file if someone from Figma wants a concrete example.

1 reply

Jaycee Lewis
Figmate
Figmate
Oct 27, 2026 5:45 AM UTC

Hey ​@michael.g 👋 Thanks for the great feedback. I appreciate the links as well. Is there anything else specific to this request that you’d want the product team to know? Thank you! — Jaycee