react-router-hashlink

react-router-dom/Link wrapper to handle hash value

Downloads
78
Stars
9

react-router-hashlink

react-router-dom/Link wrapper to handle hash value

Install

$ npm install --save react-router-hashlink

Usage

import { HashLink } from 'react-router-hashlink';

...

<HashLink to="https://github.com/1000ch/react-router-hashlink#install">
  Hello
</HashLink>

Config

Property Type Default Value
to String or Object -
behavior String auto
delay Number 0
onClick Function () => {}

You can configuire scroll behavior via behavior property applied to ScrollBehavior option of scrollIntoView(). You probably want to polyfill it with smooth scroll polyfill.

License

MIT © Shogo Sensui

Package Rankings
Top 14.63% on Npmjs.org
Badges
Extracted from project README
Build Status devDependency Status peerDependency Status