Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

Fixhash

fixes the hash scroll-to function that is a known issue with reach router

Install

yarn add gatsby-plugin-fixhash

Use

in gatsby-config.js

plugins: [
  {
    resolve: `gatsby-plugin-fixhash`,
    options: {
      offsetY: 20 // number, optional offset
      scrollToOptions : {
        // see: https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions
        behavior: `smooth`
      }
    }
  }
];
© 2023 Gatsby, Inc.