Skip to main content
Question

Creating an expanding card

  • March 11, 2021
  • 5 replies
  • 12571 views

B3n

Hi, I’m tinkering with how to make an expanding card like you would have in a mobile app. I was able to get the component to expand correctly but what I can’t figure out is how I would overlay the expanded card on top of the other cards?

Any ideas/suggestions would be much appreciated!!

Screen Shot 2021-03-11 at 1.11.52 PM|584x500

5 replies

Josh
  • Former Community Manager
  • 1019 replies
  • March 11, 2021

Are you working with interactive components or is this just a general question? Just want to make sure this ends up in the right category. 🙂


B3n
  • Author
  • 14 replies
  • March 11, 2021

Yes, interactive components. I assume I probably need to make some kind of nested interaction but I’m not totally sure how that would work.


Grahammertime

This an interesting one… What you really are looking for is the option to change the size the component on the “click” event, which if it were in an auto layout with hug contents, would give you the desired results (with clip content on your component of course).

I have been looking for something similar to build collapsing left nav sections where the entire left nav is in an auto layout. It would be possible if the interaction option allowed “Show/Hide” of items within the auto layout on the “click” event for the section title.


ntfromchicago

There are probably two techniques you have to use here to achieve this use case. The first is to disable clip content to animate the expansion of the card. The second is to do the Auto Layout flip trick to restack the cards so the animation goes above the cards underneath. Here’s a really hacky demo I came up with in a few minutes. Figma


B3n
  • Author
  • 14 replies
  • March 18, 2021

Hey, I appreciate your help. I think what you came up with would work but would you mind sharing your full working file? Otherwise I can’t see how you created the interactions.

Thanks!


Reply


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