code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

Using backticks in the example code results in a "Error loading Code Connect Failed to load Code Connect example"

Open alexismo opened this issue 4 months ago • 0 comments

figma.connect(Autocomplete, "<FIGMA_BACKTICK_TEST>", {
  props: {
    label: figma.nestedProps("field-label", { label: figma.string("label") }),
  },
  example: ({ label }) => <Chip label={label.label} otherProp={(value)=>(`${value.length}`)} />,
});

Passes dry-run validation, but results in

Image
figma.connect(Autocomplete, "<FIGMA_BACKTICK_TEST>", {
  props: {
    label: figma.nestedProps("field-label", { label: figma.string("label") }),
  },
  example: ({ label }) => <Chip label={label.label} otherProp={(value)=>value.length} />,
});

correctly assigns the following Code Connect snippet: Image

alexismo avatar Sep 08 '25 21:09 alexismo