This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

scroller-position

1.2.2 • Public • Published

Scroller-Position

Scroll postion gives you scroll X and Y positions and its ligthweight and fast

Features

  • Lightweight
  • Vertical and horizontal scroll position

Installation

With yarn

yarn add scroller-position

With npm

npm install scroller-position

Getting Started

import { Scroller } from "scroller-position";

export default function Home() {
	const { isOnTop, scrollX, scrollY } = Scroller();

	return (
		<div>
			<p>Is scroll position on top: {isOnTop ? "True" : "false"}</p>
			<p>Vertical Position: {scrollY}px</p>
			<p>Horizontal Position: {scrollX}px</p>
		</div>
	);
}

Package Sidebar

Install

npm i scroller-position

Weekly Downloads

3

Version

1.2.2

License

MIT

Unpacked Size

2.93 kB

Total Files

3

Last publish

Collaborators

  • alimuhammadf5