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

What is Framer? Join the Community
Return to index
Thierry Meier
Posted Aug 23 - Read on Facebook

How can I put a layer above a ScrollComponent? As you know, the ScrollComponent immediately moves on top of all other layers – layer.bringToFront().


Aalok Trivedi

whatever layer you want to bring to front has to have the same parent as the layer you want it in front of. Ex: if you want layerB to be infront of layerA, layerB and layerA have to have the same parent layer. if layerA doesn't have a parent and layerB does, you can just do layerB.parent = null and do the bringToFront function

Thierry Meier

Thanks for the response Aalok Trivedi – the problem was simpler though. I imported a Sketch file and put a ScrollComponent layer over it, which it then of course put in front of everything below on the Sketch file. Using scroll = ScrollComponent.wrap(sketch.content) solved the issue as the ScrollComponent inserted itself in to the layer hierarchy of the Sketch file.

Read the entire post on Facebook