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

What is Framer? Join the Community
Return to index
John Lee
Posted Sep 26 - Read on Facebook

Yo yo, ma Framer'ers
Thanks to the super-smart skills of Krijn Rijshouwer I was shown how to add CSS styling to an onClick event inside a loop of dynamic layers (YAY)

However, I'd like to get this working like a tab – where only one button at anytime can get the active state.

I thought working inside the initial loop and use @.onclick -> but this didn't work.
I then thought about another loop with the initial tabs layers pushed to an Array..., alas my brain couldn't handle that today.

Any advice and I'll send happy rainbows your way for the weekend (I promise!)



Krijn Rijshouwer

Hey John! Haha, thanks for the kind words man. Here's an example that illustrates how you can achieve this →

As you can see I've also introduced some functions to the prototype. I think you're ready for it. Don't be afraid to send me a PM if something is unclear.

John Lee

OMG, I worship the ground you walk on! I'm definitely ready to up my game with Framer and look forward to building some really cool stuff.
I have sent happy rainbows your way for the weekend (Amsterdam?)

Sergey Zinchenko

Why you don't use states?

Mike Johnson

Hey John Lee, I decide to do a quick screen cast playing with this code a bit. It's a bit longer than I expected but I'm still getting used to balancing explaining code and getting through it all.

Let me know what you think, too slow? Too fast? Any thoughts?

Read the entire post on Facebook