Skip to content
r.

react-router-hash-link

rafgraph/react-router-hash-link · Public GitHub repository

Hash link scroll functionality for React Router

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

react-router-hash-link live demo screenshot
Captured from the live demo · 2026-11-03

About this project

Author-written excerpt from the project README.

This is a solution to React Router's issue of not scrolling to #hash-fragments when using the component to navigate.

When you click on a link created with react-router-hash-link it will scroll to the element on the page with the id that matches the #hash-fragment in the link. This will also work for elements that are created after an asynchronous data load. Note that you must use React Router's BrowserRouter for this to work.

Requirements and intended audience

This is a solution to React Router's issue of not scrolling to #hash-fragments when using the component to navigate.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-10-20. Source: https://github.com/rafgraph/react-router-hash-link/blob/main/README.md

Recorded maintenance information

Last recorded source update: 2021-10-07. Saved release: v2.4.3 · 2021-05-13. These dates do not guarantee ongoing maintenance.

Technologies
React
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-23. This does not test every feature.

Browse related categories