All Projects → makotot → React Scrollspy

makotot / React Scrollspy

Licence: mit
🔯 react scrollspy component

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Scrollspy

React Scroll Parallax
🔮 React components to create parallax scroll effects for banners, images or any other DOM elements
Stars: ✭ 1,699 (+344.76%)
Mutual labels:  component, scroll
React Scrolllock
🔒 Prevent scroll on the <body />
Stars: ✭ 393 (+2.88%)
Mutual labels:  component, scroll
Scrollprogress
🛸 Light weight library to observe the viewport scroll position
Stars: ✭ 148 (-61.26%)
Mutual labels:  component, scroll
React Scrollbars Custom
The best React custom scrollbars component
Stars: ✭ 576 (+50.79%)
Mutual labels:  component, scroll
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: ✭ 216 (-43.46%)
Mutual labels:  component, scroll
Nanocomponent
🚃 - create performant HTML components
Stars: ✭ 355 (-7.07%)
Mutual labels:  component
Polyfill Ctype
This component provides a partial, native PHP implementation for the Ctype extension.
Stars: ✭ 3,774 (+887.96%)
Mutual labels:  component
Minui
基于规范的小程序 UI 组件库,自定义标签组件,简洁、易用、工具化
Stars: ✭ 3,512 (+819.37%)
Mutual labels:  component
Uos
🐭 A tiny 250b scroll listener with progress.
Stars: ✭ 349 (-8.64%)
Mutual labels:  scroll
Next
🦍 A configurable component library for web built on React.
Stars: ✭ 4,045 (+958.9%)
Mutual labels:  component
Hc Sticky
JavaScript library that makes any element on your page visible while you scroll.
Stars: ✭ 375 (-1.83%)
Mutual labels:  scroll
Xlcardswitch
iOS 利用余弦函数特性实现可以居中放大的图片浏览工具
Stars: ✭ 361 (-5.5%)
Mutual labels:  scroll
Dragsloplayout
A UI library for Android
Stars: ✭ 354 (-7.33%)
Mutual labels:  scroll
Element Queries Spec
A spec for a Container-Style Element Query Syntax
Stars: ✭ 375 (-1.83%)
Mutual labels:  component
Jigsaw
Jigsaw七巧板 provides a set of web components based on Angular5/8/9+. The main purpose of Jigsaw is to help the application developers to construct complex & intensive interacting & user friendly web pages. Jigsaw is supporting the development of all applications of Big Data Product of ZTE.
Stars: ✭ 354 (-7.33%)
Mutual labels:  component
Jxpagelistview
高仿闲鱼、转转、京东、中央天气预报等主流APP列表底部分页滚动视图
Stars: ✭ 377 (-1.31%)
Mutual labels:  scroll
Liquor Tree
Tree component based on Vue.js
Stars: ✭ 348 (-8.9%)
Mutual labels:  component
Jquery.scrollto
Lightweight, cross-browser and highly customizable animated scrolling with jQuery
Stars: ✭ 3,609 (+844.76%)
Mutual labels:  scroll
Vue Tagsinput
A simple tags input with typeahead (autocomplete) built with Vue.js 2.
Stars: ✭ 375 (-1.83%)
Mutual labels:  component
React Cool Img
😎 🏞 A React <Img /> component let you handle image UX and performance as a Pro!
Stars: ✭ 356 (-6.81%)
Mutual labels:  component

react-scrollspy

npm version travis dependencies DevDependencies License downloads

Scrollspy component

Demo

Install

$ npm i react-scrollspy

Usage

import Scrollspy from 'react-scrollspy'

...

<div>

  <div>
    <section id="section-1">section 1</section>
    <section id="section-2">section 2</section>
    <section id="section-3">section 3</section>
  </div>

  <Scrollspy items={ ['section-1', 'section-2', 'section-3'] } currentClassName="is-current">
    <li><a href="#section-1">section 1</a></li>
    <li><a href="#section-2">section 2</a></li>
    <li><a href="#section-3">section 3</a></li>
  </Scrollspy>

</div>

Props

items={ Array }

Id list of target contents.

currentClassName={ String }

Class name that apply to the navigation element paired with the content element in viewport.

scrolledPastClassName={ String }

Class name that apply to the navigation elements that have been scrolled past [optional].

componentTag={ String | React element type }

HTML tag or React Component type for Scrollspy component if you want to use something other than ul [optional].

style={ Object }

Style attribute to be passed to the generated <ul/> element [optional].

offset={ Number }

Offset value that adjusts to determine the elements are in the viewport [optional].

rootEl={ String }

Name of the element of scrollable container that can be used with querySelector [optional].

onUpdate={ Function }

Function to be executed when the active item has been updated [optional].

Methods

offEvent

Remove event listener of scrollspy.

onEvent

Add event listener of scrollspy.

Development

$ git clone https://github.com/makotot/react-scrollspy.git
$ cd react-scrollspy
$ npm i
$ npm run start

Contributing

Pull requests and reporting an issue are always welcome :)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].