# @types/scrollbooster

> TypeScript definitions for scrollbooster

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

## Install

```sh
npm install @types/scrollbooster
pnpm add @types/scrollbooster
yarn add @types/scrollbooster
bun add @types/scrollbooster
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2023-11-07 |
| First published | 2020-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | types |

## Links

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

## Recent versions

- 3.0.3 (latest) — 2023-11-07
- 3.0.0 (ts4.3) — 2023-07-25
- 2.2.2 (ts4.1) — 2022-10-04
- 2.2.1 (ts3.6) — 2021-07-06
- 2.2.0 (ts2.8) — 2020-03-02
- 3.0.2 — 2023-10-18
- 3.0.1 — 2023-09-25

## README

# Installation
> `npm install --save @types/scrollbooster`

# Summary
This package contains type definitions for scrollbooster (https://github.com/ilyashubin/scrollbooster).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrollbooster.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrollbooster/index.d.ts)
````ts
export interface Position {
    x?: number | undefined;
    y?: number | undefined;
}

export interface ScrollingState {
    isMoving: boolean;
    isDragging: boolean;
    isScrolling: boolean;
    position: Required<Position>;
    dragOffset: Required<Position>;
    dragAngle: number;
    borderCollision: {
        left: boolean;
        right: boolean;
        top: boolean;
        bottom: boolean;
    };
}

export interface ScrollBoosterOptions {
    viewport: Element;
    content: Element;
    direction?: "all" | "vertical" | "horizontal";
    pointerMode?: "all" | "touch" | "mouse";
    scrollMode?: "transform" | "native" | undefined;
    bounce?: boolean;
    bounceForce?: number;
    friction?: number;
    textSelection?: boolean;
    inputsFocus?: boolean;
    emulateScroll?: boolean;
    preventDefaultOnEmulateScroll?: "vertical" | "horizontal";
    lockScrollOnDragDirection?: "all" | "vertical" | "horizontal";
    dragDirectionTolerance?: number;
    onClick?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
    onUpdate?: (state: ScrollingState) => void;
    onWheel?: (state: ScrollingState, event: Event) => void;
    shouldScroll?: (state: ScrollingState, event: Event) => boolean;
    onPointerDown?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
    onPointerUp?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
    onPointerMove?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
}

export default class ScrollBooster {
    constructor(options: ScrollBoosterOptions);
    destroy(): void;
    setPosition(position: Position): void;
    getState(): ScrollingState;
    scrollTo(position: Position): void;
    updateMetrics(): void;
    updateOptions(options: Partial<ScrollBoosterOptions>): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Chris](https://github.com/chrisneven), and [Chris Frewin](https://github.com/princefishthrower).

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