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

What is Framer? Join the Community
Return to index
Chad Lonberger
Posted Aug 20 - Read on Facebook

How might one prototype something with nested views/states in FramerJS, such as a Tab-bar controller? Can nested layers be controlled by a layer's state?

The following expectedly fails...

option1: {option1ContentArea.opacity: 1.0}
option2: {option2ContentArea.opacity: 1.0}
option3: {option3ContentArea.opacity: 1.0}

Or perhaps a subLayer's state?

option1: {option1ContentArea.states.switch("show")}
option2: {option2ContentArea.states.switch("show")}
option3: {option3ContentArea.states.switch("show")}

Or can a "View" be defined that governs multiple layers states? For example, how AngularJS's UI-Router library flexibly nests states?

...excluded opacity:0 and switch("hide") type statements for brevity.

Thanks in advance!


Mike Feldstein

I've been trying to do the same thing. I usually make a class that extends Layer and has many child views, the define a property that I can then animate, and that properties setter will set the appropriate properties on its children

Chad Lonberger

Thanks, any chance you have a gist of that Mike Feldstein?

Mike Feldstein

If that's what you were referring to.

Mike Feldstein

Also i just now realize that it's not.

Mike Feldstein

ok just updated it try it out

Read the entire post on Facebook