Socket
Socket
Sign inDemoInstall

react-focus-scroll

Package Overview
Dependencies
6
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-focus-scroll

A react component which focuses sections while scrolling


Version published
Maintainers
1
Install size
79.3 kB
Created

Readme

Source

React Focus on Scroll

dependencies Status Build Status semantic-release

A react component which focuses sections while scrolling

See Demo and Documentation.

Props

The component takes the followin props.

PropTypeDescription
classNamestringAdditional classnames for the component
focusOnstringInitial focused section
onFocusfunctionCallback function to invoke when a section is focues The function should contain one parameter(focusIndex).

Installation

npm install react-focus-scroll --save

Usage

import FocusOnScroll from "react-focus-scroll";

<FocusOnScroll
  focusOn="1"
  onFocus={onFocus}
  classNames="custom-class"
>
  <div>This is first section</div>
  <div>This is second section</div>
</FocusOnScroll>

License

MIT Licensed. Copyright (c) Farhad Yasir 2019.

Keywords

FAQs

Last updated on 09 Apr 2019

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