How To Fix Position When Scrolling Figma

Designers all over the world have fallen in love with Figma for its versatility and robust feature set. However, as with any powerful design tool, there can be a learning curve. One feature that can be a bit tricky to use initially is “Fix Position When Scrolling”. This handy feature allows you to keep elements static while the rest of your design scrolls. It’s very useful for elements like headers, footers, or navigation menus. Let’s explore how to fix position when scrolling in Figma.

Step 1: Select your Frame

To start, you need to have a frame in Figma. In order to apply the “Fix Position When Scrolling” feature, select the frame on which you want to apply it.

Step 2: Select the Layer

After selecting the frame, you need to select the specific layer that you want to keep fixed during scrolling. This could be a group of elements, a component, or even a single item.

Step 3: Fix Position

With the layer selected, take a look at the right-side panel. Here you will find a plethora of options, including the “Fix Position When Scrolling” checkbox. Enable this option by ticking the box. Once you have done this, your selected layer will stay in the same place even when you scroll the frame.

//Select the frame
let frame = figma.currentPage.findOne(n => n.type === “FRAME” && n.name === “Your Frame Name”);

//Select the layer within that frame
let layerToFix = frame.findOne(n => n.type === “RECTANGLE” && n.name === “Your Layer Name”);

//Fix the position
layerToFix.constraints = { vertical: “TOP”, horizontal: “LEFT_RIGHT” };

Note: Ensure to replace “Your Frame Name” and “Your Layer Name” with the actual names of your frame and layer.

Step 4: Test it Out

Now that you’ve set up the fixed position, it’s time to test out your work. If done correctly, the selected layer will stay in place when you scroll through your frame.

Conclusion

That’s it! You’ve successfully learned how to fix the position of an element in Figma when scrolling. It’s a simple yet powerful tool that can help you create more sophisticated designs. Keep in mind that like any design tool, Figma takes a little getting used to. Practice, patience, and a willingness to explore are the keys to mastering it.