maxWidth Property?

I see this specific version (Version 1, Update 69 | Plugin API) has a change I want to use - maxWidth on Text or AutoLayout. However, I can’t find a way to update my plugin to this version so that I can use this style property. Any suggestions?

I’ve tried implementing (multiple ways) in my current code and keep getting the error “Property does not exist in IntrinsicAttributes & AutoLayoutProps”.

Any ideas/advice?

It’s not clear from your description whether you’re using the Plugin API or the Widget API because you’re referring to both. Where are you seeing this error: in the Figma Desktop app console or in your IDE?

Unfortunately, there is still not enough information. What ways have you tried? Have you updated your typing files? What is the structure of the node that you want to change the property on? What node is this? Is this node an auto layout frame? If it’s not an auto layout frame, is it nested within an auto layout frame?

I’m seeing the error in my IDE.

I’ve tried adding the maxWidth to:

  • Autolayout (various levels of frames and nesting - top to bottom)
  • Text w/in an Autolayout

I’d like to have the maxWidth applied to that widget.Text name=“ActText” in conjunction with the width={“hug-contents”}, which I can do in Figma itself, but seem unable to translate to the code.

The error

I think we’re trying to use the widget api!

1 Like

We’re trying to build a plugin and using the widget API. When using the Text component, it seems we can’t use the maxWidth prop on it. We’re tried updating both widget and plugin api in our package.json file to 1.77.0 and 1.8.0 respectively

Apologies, i meant we’re building a widget* not a plugin

Thanks for bringing this up. I’ve reported this issue internally.

2 Likes