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

What is Framer? Join the Community
Return to index
John Sherwin
Posted Aug 31 - Read on Facebook

Hi guys, I'm trying to animate the opacity of a sublayer in Framer. I have an array called "Cards" and there are 3 cards inside the array, each card contains 2 sublayers "label" and "value" which are just two html layers pulling values from other arrays. I'm trying to animate the "value" label on a click event. When I write value.animate and then try and animate its opacity property Framer tells me that it can't find a variable "value" even though it exists. Is this because its a sublayer or because its a sublayer of a layer that is part of an array? I've attached the code snippet. I know this is wrong but its an attempt to access the sublayer to animate that on its own. Any help is much appreciated. Cheers!


Jordan Robert Dobson

Looks right to me....

So what happens and what do you see when do a print instead...

print value for value in layer.subLayers

John Sherwin

Thanks for the reply Jordan Robert Dobson this is what it prints out - just the attributes of the 3 sublayers as far as I can see » <Layer id:13 name:label (0,0) 200x200>
» <Layer id:14 name:value (0,0) 200x200>
» <Input id:15 name:searchInput (20,45) 500x60>

Read the entire post on Facebook