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

What is Framer? Join the Community
Return to index
Paul Kooi
Posted Jan 25 - Read on Facebook

Couple of questions:
1. Is there a way to set the state at runtime? Say you want load a prototype and would like an object to assume a state other than default?

2. Is there a way to dynamically parent something based on state. Say on stateA you want it parented to a scroll container. On stateB you want it parented to another object?

I found a hack around both of these issues. Just thought I'd ask and see if you ninja's out there have some experience with these things. Thanks

2 Comments

Andrew Liebchen

1. object.stateSwitch 'state'

Andrew Liebchen

I guess on the other one...maybe not exactly the answer to the condition of your question: What if you just switched the parent on a click of the thing that triggers the state change?

button.onClick ->
child.parent = if !child.parent then scroll else null

Read the entire post on Facebook