React Scrollable Anchor Component

Category: React , Scroll | April 11, 2017
Author: gabergg
Views Total: 733
Official Page: Go to website
Last Update: April 11, 2017
License: MIT

A Lightweight React component for smooth scrolling anchors in React, tied to URL hash.

Features:

  • Land on the correct anchor when the page is loaded, based on URL hash value.
  • Scroll smoothly to anchors when URL hash changes. Easy links to sections with <a href='#sectionId'>.
  • URL hash updates automatically to reflect section in view
  • Option to record history on hash changes

Installation:

npm install –save react-scrollable-anchor

Preview:

React Scrollable Anchor Component