Skip to main content
Question

Accordion Menu resizes width to fit label

  • September 24, 2021
  • 3 replies
  • 763 views

B3n

I’m trying to create an accordion style menu and I want the width to resize according to the length of the labels and I just cannot for the life of me get that part to work. So the goal is that if any of the accordion menu item labels exceed the default width of the Accordion it will resize to accommodate the longer labels.

Any ideas?

Figma – 16 Mar 21
This topic has been closed for comments

3 replies

wolfr
  • New Participant
  • 20 replies
  • September 25, 2021

Hi B3n! I think you want to use “fill container” on the autolayout.

Screen Shot 2021-09-25 at 11.49.42


B3n
  • Author
  • 14 replies
  • September 27, 2021

Yep I’ve tried every combination I I can think of using Auto Layout and I think the problem lies with the ‘Accordion-State’ component. When I change the ‘Resizing’ on the ‘Accordion-State’ components that are nested inside the main ‘Accordion’ component it changes the width for the ‘Accordion’ to be ‘Fixed’. Then if I change the resizing to ‘Hug Contents’ for the ‘Accordion’ component it will just change the ‘Accordion-State’ components to ‘Fixed’ and it just keeps going back and forth like that.

I guess there’s no way to have this kind of component ‘Fill Container’?


  • 0 replies
  • October 24, 2021

This topic was automatically closed after 30 days. New replies are no longer allowed.


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