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

Objects values as props

Open Stefenyo opened this issue 5 months ago • 0 comments

from what I'm seeing, if a Figma prop is nested in an object, it doesn't work. So on line 4 in the below example (text: figma.string('Title')) doesn't render.

{
  title: figma.boolean('Has Title', {
    true: {
      tag: 'span',
      text: figma.string('Title')
    },
    false: undefined
  })
}

If It is applied as { true: text: figma.string('Title')}, then it works.

Is there a way around this ?

Stefenyo avatar Sep 09 '25 19:09 Stefenyo