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

What is Framer? Join the Community
Return to index
Victoria Koval
Posted Nov 08 - Read on Facebook

Hey everyone!

I’ve realized that all info which I’ve read about coffee js is mixed up in my head and I need to organize it somehow! And then I was inspired by Tony Jing and his “100 days of Framer” and I saw the opportunity to get used to Framer making my own “100 days Challenge of Framer” for myself! =)

Therefore I have 1 issue which I faced on - why layer (named “switch_btn” in my code) don’t remember his default properties which I created in Design Tool such as shadowColor? If you try to tap switch you can see it has a pink shadow then dark blue but after that, it doesn't change the color of the shadow. Maybe you could give me advice how to fix it and why I have this problem.. (I don’t see my mistake, unfortunately)

And if you have any other suggestions how to improve code - I will be thankful you!


Derek Nguyen

I think Framer has changed the way shadow is declared in order to support multiple shadows, but forgot to support the old properties in default state. Changing the way you declare shadow to:

layer.states.night =
----color: '#123123'

should do the trick.

I think it's better to move all the layer.states.night outside of the event handler -- you only need to create them once.

Also i think you should avoid `#` in project name -- i think it caused some weird error when i download the project.

Lovely design!

Kelby Garside


Victoria Koval

btw, guys, I've made the same switch button but for watch =) what do you think?)

Alexandru Raduca


Alexandru Raduca

the default state should be fed from the design view

Read the entire post on Facebook