# @types/smooth-scroll

> TypeScript definitions for smooth-scroll

Latest version **16.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/smooth-scroll
pnpm add @types/smooth-scroll
yarn add @types/smooth-scroll
bun add @types/smooth-scroll
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 16.1.4 |
| Published | 2023-11-07 |
| First published | 2018-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51369 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/smooth-scroll
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smooth-scroll
- npm.io page: https://npm.io/package/@types/smooth-scroll

## Recent versions

- 16.1.4 (latest) — 2023-11-07
- 16.1.1 (ts3.6) — 2021-07-06
- 16.1.0 (ts2.1) — 2019-08-23
- 16.1.3 — 2023-10-18
- 16.1.2 — 2023-09-25
- 14.2.0 — 2018-11-06

## README

# Installation
> `npm install --save @types/smooth-scroll`

# Summary
This package contains type definitions for smooth-scroll (https://github.com/cferdinandi/smooth-scroll).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smooth-scroll.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smooth-scroll/index.d.ts)
````ts
export as namespace SmoothScroll;

export = SmoothScroll;

declare namespace SmoothScroll {
    type Easing =
        | "Linear"
        | "easeInQuad"
        | "easeInCubic"
        | "easeInQuart"
        | "easeInQuint"
        | "easeInOutQuad"
        | "easeInOutCubic"
        | "easeInOutQuart"
        | "easeInOutQuint"
        | "easeOutQuad"
        | "easeOutCubic"
        | "easeOutQuart"
        | "easeOutQuint";

    interface Options {
        // Selectors
        ignore?: string | undefined;
        header?: string | undefined;
        topOnEmptyHash?: boolean | undefined;

        // Speed & Easing
        speed?: number | undefined;
        speedAsDuration?: boolean | undefined;
        durationMax?: number | null | undefined;
        durationMin?: number | null | undefined;
        clip?: boolean | undefined;
        offset?:
            | number
            | ((
                anchor?: Element | number | null,
                toggle?: Element | null,
            ) => number)
            | undefined;
        easing?: Easing | undefined;
        customEasing?: ((time: number) => number) | undefined;

        // History
        updateURL?: boolean | undefined;
        popstate?: boolean | undefined;

        // Custom Events
        emitEvents?: boolean | undefined;
    }
}

declare class SmoothScroll {
    constructor(selector?: string, options?: SmoothScroll.Options);

    init(options?: SmoothScroll.Options): void;

    destroy(): void;

    animateScroll(
        anchor: Element | number | null,
        toggle?: Element | null,
        options?: SmoothScroll.Options,
    ): void;

    cancelScroll(noEvent?: boolean): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Andrei Horodinca](https://github.com/andreiho), and [grgr-dkrk](https://github.com/grgr-dkrk).

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