@mkoelewijn/anchor

1.0.0 • Public • Published

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/anchor

Want to use yarn?

yarn add @mkoelewijn/anchor

Usage

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

Readme

Keywords

none

Package Sidebar

Install

npm i @mkoelewijn/anchor

Weekly Downloads

5

Version

1.0.0

License

MIT

Unpacked Size

481 kB

Total Files

7

Last publish

Collaborators

  • mkoelewijn