# @types/scroll-into-view

> TypeScript definitions for scroll-into-view

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

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.16.4 |
| Published | 2023-11-07 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.16.4 (latest) — 2023-11-07
- 1.16.1 (ts4.3) — 2023-08-25
- 1.16.0 (ts3.7) — 2021-09-23
- 1.13.1 (ts3.6) — 2021-07-06
- 1.13.0 (ts3.5) — 2021-04-22
- 1.6.7 (ts2.0) — 2019-05-14
- 1.16.3 — 2023-10-18
- 1.16.2 — 2023-09-25
- 1.6.6 — 2018-11-01
- 1.6.5 — 2016-10-05
- 1.6.4 — 2016-09-19
- 1.6.3 — 2016-08-25
- 1.6.2 — 2016-08-19
- 1.6.1 — 2016-08-02

## README

# Installation
> `npm install --save @types/scroll-into-view`

# Summary
This package contains type definitions for scroll-into-view (https://github.com/KoryNunn/scroll-into-view).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scroll-into-view.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scroll-into-view/index.d.ts)
````ts
declare namespace __ScrollIntoView {
    interface Settings {
        time?: number | undefined;
        ease?: ((value: number) => number) | undefined;
        validTarget?: ((target: HTMLElement, parentsScrolled: number) => boolean) | undefined;
        align?: Alignment | undefined;
        isScrollable?:
            | ((target: HTMLElement, defaultIsScrollable: (target: HTMLElement) => boolean) => boolean)
            | undefined;
        isWindow?: ((target: HTMLElement) => boolean) | undefined;
        cancellable?: boolean | undefined;
        maxSynchronousAlignments?: number | undefined;
        debug?: boolean | undefined;
    }

    interface Alignment {
        /** 0 to 1, default 0.5 (center) */
        top?: number | undefined;
        /** 0 to 1, default 0.5 (center) */
        left?: number | undefined;
        /** pixels to offset top alignment */
        topOffset?: number | undefined;
        /** pixels to offset left alignment */
        leftOffset?: number | undefined;
        /** boolean to prevent X scrolling */
        lockX?: boolean | undefined;
        /** boolean to prevent Y scrolling */
        lockY?: boolean | undefined;
    }

    /** type will be 'complete' if the scroll completed or 'canceled' if the current scroll was canceled by a new scroll */
    type callbackParameterType = "complete" | "canceled";
    type Callback = (type: callbackParameterType) => void;

    interface ScrollIntoView {
        (target: HTMLElement, callback?: __ScrollIntoView.Callback): void;
        (target: HTMLElement, settings: __ScrollIntoView.Settings, callback?: __ScrollIntoView.Callback): void;
    }
}

declare module "scroll-into-view" {
    var scrollIntoView: __ScrollIntoView.ScrollIntoView;
    export = scrollIntoView;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [zivni](https://github.com/zivni), [Thibaut](https://github.com/Thibaut-Fatus), and [goodCycle](https://github.com/goodCycle).

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