Skip to main content
Question

maxWidth Property?

  • September 20, 2023
  • 7 replies
  • 371 views

Samantha_Fraser

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?

This topic has been closed for replies.

7 replies

tank666
  • 4873 replies
  • September 20, 2023

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?


Samantha_Fraser

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.


Samantha_Fraser

The error


Manuel_Carrera

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


Manuel_Carrera

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


Manuel_Carrera

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


James_Yang
Figmate
  • Figmate
  • 82 replies
  • September 21, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings