Skip to main content
Solved

"Fix Position When Scrolling" not working as part of a component instance


Daniel_Jones

When I apply “Fix Position When Scrolling” to an object in a component, that “Fix Position” behavior shows up in instances within its file of origin, but doesn’t show up in instances of that component in other files.

To recreate:

  1. Apply “Fix Position When Scrolling” to an object inside of a frame
  2. Turn the parent frame into a component and publish it as a library
  3. Drop an instance of that component in new file
  4. Preview in a prototype
  5. Notice that the fixed object isn’t fixed!

Best answer by Macky_Tanaka

Under the right-hand side toolbar, under Prototype, make sure the overflow behavior is on “vertical scrolling” or horizontal or both instead of “No scrolling”. After going back to Design mode, you should be able to get “Fix position when scrolling” if you select an object.

View original
This topic has been closed for comments

49 replies

Chris_Kerr

I’m also having this issue.

@Andrew_Chan is this something that’s being looking into?


Johannes3

Also having the same issue. Makes working with components useless in some cases.


Elsa
  • 1 reply
  • May 12, 2021

I desperately need that fixed!


Ricky_Zhang

Still happening. Is this a bug or feature?


Daniel_Masters

Major issue for me. Anything, Figma folks?


SaeedKhader

I’m also having this issue.


Macky_Tanaka

Under the right-hand side toolbar, under Prototype, make sure the overflow behavior is on “vertical scrolling” or horizontal or both instead of “No scrolling”. After going back to Design mode, you should be able to get “Fix position when scrolling” if you select an object.


Ricky_Zhang

omg you figured this out


Sara_Traversari

For me Vertical scrolling under “Prototype” is the selected option (it’s in the component of this instance) but it is greyed out. I can not select the option “Fix position when scrolling” in the instance, and the header doesn’t stick…
I tried to remove the “Fix position…” from the component to see if I could add it in the instance, but that doesn’t change anything.

Thoughts?
image


Daniel_Jones

I really wish this did the trick! The problem persists for me.

The problem is that a child instance of a component won’t scroll properly when it’s used in a different Figma file.

Double check my work: Make a component with a fixed header and/or footer and some non-fixed interior content. Enable vertical scrolling on that component. Take an instance of that component into a new file that is linked to the library file where you made the original component. You’ll see that when you try to interact with that component the fixed position is not functioning.


Rafael_Moschen

I was having issues with that too.
The solution I found was to adjust the component to the place I wanted it to be fixed.
In my case it was at the bottom of the page. So I set the ‘Constraints and resizing’ and it started to show up in the prototype.


Marti_Rhea

I am also having this exact issue. I also have tried the advice suggested by the others and still cannot solve the problem. Have you made any progress since your latest post?


Peter_Nunn

Also having this issue. It does make the components almost unworkable for my needs.


Anna_Nojek

I am having the same issue and have tried everything mentioned above. I have played with components, tried to use additional components. None of it works. I am trying to make a FAB with hover effect but the button disappears once I check the Fix position when scrolling option. Figma, do something with it!


tank666
  • 4854 replies
  • July 8, 2021

Wrap your instance in a frame and set the desired constraints and “Fix position when scrolling” for this frame.


Anna_Nojek

Already done it… The main component is wrapped in a frame, I have tried to set the fix position when scrolling for it as a major trait, then I tried if it works with its instance on a screen where the button is placed, when it did not work I have set the option with fixing for the button (instance) on the screen… Vertical constraint. None of it works.


tank666
  • 4854 replies
  • July 8, 2021

Duplicate this file and try to do the same in your file.

Figma – 2 Jul 21

Daniel_Jones

This doesn’t solve the core issue, at least for me. The component needs to be part of an asset library to reproduce the issue.

Make a parent component with a fixed element inside of it. Publish it to a library. Enable that library in a new project file. Use the component. The fixed element will not stay fixed on scroll. The only workaround is to detach the parent component and re-fix the fixed elements within the frame.


Anna_Nojek

I found out the problem while sleeping. Literally. The button was placed on the bottom of a page, which was longer than a screen. When I placed it in a screen light, the button is visible…


Yasna_Goldshmidt

Thank you so much! 🙌


Tamara_Didenko

I had a similar issue. Not with a component, but just with a basic frame. It looks like the “Fix position when scrolling” checkbox doesn’t appear if the parent frame has an Auto layout on it? Would love confirmation from someone from Figma.


tank666
  • 4854 replies
  • July 13, 2021

Hi @Tamara_Didenko, could you show the layers panel and indicate which layer you select?


Janine
  • 1 reply
  • August 18, 2021

Oh my god. I spent hours trying to figure this out for my anchor navigation component.

Scroll to doesn’t work with components (except the master component) at all, and additionally if you are trying to smart animate it doesn’t work both ways. [The first way works as it’s the master, but not the reverse e.g. a drop down list demo will open but not shut]

My hack fix was to detach the anchor link nav instance on the second page and in another more complex component just overlaid a transparent button.

I really hope this gets fixed because both those solutions are temporary and i can’t have multiple pages of detached components.


Slava
  • 1 reply
  • September 17, 2021

@tank666 I’m having the same issue. I’m trying to make the heading fixed yet I can’t figure out how to do it when the parent frame / component has auto layout. Here’s an example file and screenshot of the selected layer (below). Any input would be appreciated.


Rayyan
  • 1 reply
  • October 3, 2021

THANK YOU, this one works for me!

Overflow scrolling for my screen prototype set to vertical
My sticky navbar i set to fixed positions then set the constraint to left bottom

October 3rd, 2021


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings