# light-smooth-scroll

> A very light smooth scroller used to scroll from elements to element

Latest version **1.0.1** (published 2019-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install light-smooth-scroll
pnpm add light-smooth-scroll
yarn add light-smooth-scroll
bun add light-smooth-scroll
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-09-12 |
| First published | 2019-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | math280h |
| Maintainers | thias |
| Keywords | scroll |

## Links

- npm: https://www.npmjs.com/package/light-smooth-scroll
- Repository: https://github.com/math280h/smooth-scroll
- Homepage: https://github.com/math280h/smooth-scroll#readme
- Issues: https://github.com/math280h/smooth-scroll/issues
- npm.io page: https://npm.io/package/light-smooth-scroll

## Recent versions

- 1.0.1 (latest) — 2019-09-12
- 1.0.0 — 2019-09-11

## README

# light-smooth-scroller

> A very light no nonsense javascript scroller, with smooth option. No dependencies, 2.5~KB Size.

## Features

    * Super fast and only getting faster.
    * Very light and only getting lighter.
    * No Dependencies and never getting any.

## Install

``` bash
# Using npm
npm install light-smooth-scroller

# Using yarn
yarn add light-smooth-scroller
```

You can now include light-smooth-scroller and you are all set!

``` js
// es6
import { SmoothScroller } from 'light-smooth-scroller';

// commonjs
const SmoothScroller = require('light-smooth-scroller');
```

## Usage

Javascript:

``` js
let scroller = new SmoothScroller({
    selector: '.scroll',
    header: 'navbar',
    definedOffset: 30,
    smooth: true,
});
```

HTML:

``` html
<a id="top" target="bottom" class="scroll">
    Click me!
</a>
<a id="bottom" target="top" class="scroll">
    Click me!
</a>
```

## Options

light-smooth-scroller supports 4 options, 3 which are optional

* *selector* - _class / id_ (Required - Must be a valid class name or ID of element) - No Default Selector
* *header* - _class_ (Optional - Select the class of your fixed header to calculate needed padding for scroll) - Default: none
* *definedOffset* - _number_ (Optional - If you want to add more offset to the scroll) - Default: 0
* *smooth* - _boolean_ (Optional - Defines if you want smooth scrolling or not) - Default: true

let scroller = new SmoothScroller({
    selector: '.scroll',
    header: 'navbar',
    definedOffset: 30,
    smooth: true,
});

---
_Source: https://npm.io/package/light-smooth-scroll · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
