1.0.0 • Published 5 years ago
@mkoelewijn/anchor v1.0.0
Anchor
Anchor is a simple plugin used to create smooth scrolling anchor links. It uses GreenSock to animate the window to the targetted area.
Installation
Want to use npm?
npm install @mkoelewijn/anchorWant to use yarn?
yarn add @mkoelewijn/anchorUsage
HTML
<a href="#anchor-link" data-anchor>This is an anchor link</a>
<div id="anchor-link"><p>Target area</p></div>Javascript
import Anchor from '@mkoelewijn/anchor';
new Anchor();Options
| type | Default | |
|---|---|---|
| offset | Integer | 0 |
1.0.0
5 years ago