Skip to main content
Question

Can the Code Connect template API read the layout & color values set on a component instance?

  • July 16, 2026
  • 0 replies
  • 9 views

Witsarut Hannapachewin

Hi all,

I'm using Code Connect together with the Dev Mode MCP get_design_context tool. When a node has a Code Connect mapping, the tool returns my mapped snippet (e.g. Icon(Icons.home) or Button(text: "...", variant: primary)) instead of the raw generated markup.

That works as intended, but I've noticed the returned snippet only reflects the component properties/variants I mapped — it does not include the layout and color values that the designer actually set on that specific instance (position, padding/gap, width, fill color, etc.). For non–Code-Connected nodes, get_design_context returns all of that layout/color detail, but for connected nodes it seems to disappear.

My question: Is it possible, from within the Code Connect template API to read the resolved layout properties (size) and color/fill values that are set on the instance, and inject them into the generated snippet? Or I have to add size and color as component property?

Â