i have the problem that my sticky header. It was only working in the editor, but not on the front end. I figured out, that it was not working, while scroll smoother was on.
I know there is a hint about a data attribute so that fixed elements don’t get ignored.
I tried the automatic function, but it was not working. I gave the header section the data attribute “data-brf-fixed”, but I am not really sure how this works. I gave it the name “data-brf-fixed” and the value “data-brf-fixed”, I guess this was wrong. Maybe this works not with sticky.
As you predicted, the GSAP Scroll Smoother changes the context of your fixed / sticky positioned elements. The toggle in the settings will correct fixed elements. For your sticky elements you need to find a custom solution without position: sticky. See also here:
For example, when talking about sticky headers, you could easily use GSAP Pin to sticky your header. Feel free to send me access to your site, I could create an example for this
thank you very much for the quick resonse and you offer. This is really nice. I would try it first by myselfe (to learn it), but if I get stuck, I would like to come back to you.
One question, do you know, If GSAP is from a performance piont of view more intense then the normal sticky property?
Thanks
I tried to create the header and make it as a template, set it to sticky scroll and hide in certain pixel position, and I turned on the smooth scroll using Lenis. In preview mode it worked well but when in front-end mode, the header somehow didn’t hide when the page is scrolled. is there any solution to this? ay advices will be appreciated
Just tried on my site and the header hides just fine, both on just sticky and sticky on scroll Do you have any other styles set that might cause a conflict?
If you inspect the header in the console, does it have the slide up attribute?