New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@solid-primitives/scroll

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/scroll

Primitive to manage scrolling

Source
npmnpm
Version
0.0.100
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@solid-primitives/scroll

lerna

Helpful primitives to manage browser scrolling.

createScrollObserver - Helpful monitor that reports the current position of an element or window.

Primitive ideas:

createScrollTo - A primitive to support scroll to a target createHashScroll - A primitive to support scrolling based on a hashtag change

How to use it

const position = createScrollObserver();

or

let ref;
const position = createScrollObserver(() => ref);

Demo

You may view a working example here: https://codesandbox.io/s/solid-primitives-scroll-csg7f

Changelog

Expand Changelog

0.0.100

Initial porting of the scroll primitive.

Contributors

Ported from the amazing work by at https://github.com/dance2die/react-use-localstorage.

Keywords

monitor

FAQs

Package last updated on 17 Jul 2021

Related posts