Sorry, we don't support your browser.  Install a modern browser

Smooth Scroll - add support for fixed Header#134

I use the SmoothScroll component on a One-Page-Website. So if i click inside my navigation on a item it scrolls smooth to the section. All correct so far.

The problem gets visible if i use a fixed Header/Navigation. Here the smooth scroll does not exactly stop at the top of the section, it scrolls a little bit further - exactly the height of fixed header. So if my fixed header has a height of 80px, the scroll stops 80px under the top of the section.

So it would be nice to add support here for a fixed header. :)

6 months ago

good point. We’ll look into adding a threshold variable that fixes this issue 👍

6 months ago
1
Changed the status to
In Progress
6 months ago

Hi Sven, we just pushed an updated version of the component. You can read more about fixed header option here:
https://codyhouse.co/ds/components/info/smooth-scrolling#fixed-element

6 months ago
1
Changed the status to
Completed
6 months ago
1