Socket
Socket
Sign inDemoInstall

use-section-scroll-position

Package Overview
Dependencies
6
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    use-section-scroll-position

This module allows you to identify the position of the scroll bar in respect to the different sections of your webpage. The id of these sections are passed as an array when calling the hook. When the scroll bar enters one of these sections, it returns the


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Introduction

This module allows you to identify the position of the scroll bar in respect to the different sections of your webpage. The id of these sections are passed as an array when calling the hook. When the scroll bar enters one of these sections, it returns the id of the section, and when it leaves or it is not in a section specified in the array, it returns an empty string.

Installation

npm install use-section-scroll-position

Usage

react/typescript

import useScrollPosition from "use-section-scroll-position"

 const { scrollPosition } = useScrollPosition([
    "skills",
    "portfolio",
    "articles",
  ]);

Contribute

If you would like to contribute, you are welcome.

Keywords

FAQs

Last updated on 05 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc