0.6.0 • Published 8 years ago
react-router-hashlink v0.6.0
react-router-hashlink
react-router-dom/Linkwrapper to handle hash value
Install
$ npm install --save react-router-hashlinkUsage
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.