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

What is Framer? Join the Community
Return to index
Ilie Ciorba
Posted May 21 - Read on Facebook

Hey all!

Quick questing, is there a way to create states for a layer that would change its sublayer's properties?

I need something like:

first {sublayer.position: 20}

Have a feeling that is should be pretty straightforward but doesn't work, if not possible, any other elegant ways to achieve this?


Benjamin Den Boer

Hey Ilie Ciorba - you can check the current state of your superLayer and then target its subLayers within a conditional statement. The subLayers of a layer are stored in an array. You can target them by referencing their indeces. The index of an array always starts at 0, so to target the first subLayer of a layer you can write: layerA.subLayers[0]


Ilie Ciorba

Worked, thanks a lot!

Read the entire post on Facebook