I would love to create a collapsable FAQ accordeon.
What I’ve tried
I’ve created 2 variants (open and closed question). Then I combined an instance of that interactive component into another component with smart layout, combining multiple instances into a list.
The result + problem
It folds open successfully but the second / other questions / rest of the page sections don’t move down to make space for it.
As a bonus question I’d like to make it so that only 1 question is in the open state at the same time.
@tank666 Just like Thom_van_der_Doef, I’m currently trying to make a component with a collapsed and an expanded state that pushes or pulls other elements up or down, with smart animate and autolayout. It does seems to work when I have one element alone, but as soon I’m trying to use many of them with autolayout, only the last one has the desired behaviour. It seems that for all the others, when the expanded content appears, instead of pushing others elements below, it just appears behind it. Is the expected behaviour currently possible in Figma ? Or I have done something wrong ?
Hi @Gwen_PETITEAU, it’s hard to say something without seeing how your file works. When Interactive Components came out of beta, they began to support Auto Layout. I made an example for you, which you can see here:
Hi @tank666, thanks for the prototype, it’s exactly what I’m looking for ! Is it possible to have access to the file with the layers and prototype interactions to see how it works ? It seems that I can access the prototype only.
Thanks for your help !