This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Benjamin Fritz
Posted Mar 31 - Read on Facebook

Hello, got a small question:
What's the easiest way to animate the bringtoFront() action? Right now it just stacks the layers with a hard cut, how would I add a fade or some other kind of transition?

Do I need to replace the bringtoFront() with index and add states to it?

Thanks in advance!

4 Comments

Benjamin Den Boer

Hey Benjamin (nice name!), hmm — one thing you could do is first call the bringToFront() method, then set the opacity to 0, and transition the opacity from 0 to 1 at the same time. So you can make a change in hierarchy without it being seen. :-)

Benjamin Fritz

Hey thanks, likewise. High five to creative parents. Ok, so that would be the easiest option? To clarify: What I try to simulate is choosing a link in the hamburger menu on Android, sliding out the menu and switching screens.

Benjamin Den Boer

I see. So I would start with the hierarchy change, before any animations — then trigger the animations and fades.

Benjamin Fritz

Yeah, that worked. Thanks a bunch!

Read the entire post on Facebook