Skip to main content
pitygacio
Participant
June 2, 2020
Answered

Push all elements up/down when closing/opening an accordion

  • June 2, 2020
  • 3 replies
  • 4313 views

Hi everyone,

I've created a accordion where you can interact with the first option. So the idea is that when you click the "close" button (because the default state is open), it closes and so all the content that comes after should be pushed up, and when you close it, all element should go to their previous place, how can I achieve this?

 

In case that's not possible I thought about having a second artboard and linking it to it, but the issue is that I can only link to the top of the page, is there a way I can wire an element to a specific part of another artboad instead of just the whole artboard? 

 

Thank you!

This topic has been closed for replies.
Correct answer pitygacio

*SOLVED*

I'll leave here how I solved it, in case someone else needs it 🙂

  • I duplicated the artboard
  • Changed the state of the component (I had "Default" = open, "Click" = closed)
  • Activated "Fix position when scrolling" for the component in the new duplicated artboard and change the state to "Click" there

3 replies

Syeds
Inspiring
November 4, 2021

Another member posted a solution:
https://youtu.be/Pf1a-bp3XmA

Syeds
Inspiring
November 2, 2021

Can you explain your solution visually please?

pitygacio
pitygacioAuthorCorrect answer
Participant
June 2, 2020

*SOLVED*

I'll leave here how I solved it, in case someone else needs it 🙂

  • I duplicated the artboard
  • Changed the state of the component (I had "Default" = open, "Click" = closed)
  • Activated "Fix position when scrolling" for the component in the new duplicated artboard and change the state to "Click" there