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

What is Framer? Join the Community
Return to index
Min Hu
Posted Mar 13 - Read on Facebook

If I want to add a new state with different text on the layer. Do I write
layer.states.add("stateA": {html: "textA"}, "stateB": {html:"textB"})? I tried with this and it doesn't seem working. Wondering if I did anything wrong here.

2 Comments

Johannes Eckert

we discussed this here a couple of days ago (scroll down to find it). basically, that's not posisble. you can use events stateDidChange to change the .html of a layer. layer.states.state will give you the current state name you can use in a conditional

Min Hu

Thanks!

Read the entire post on Facebook