Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@three11/infinite-scroll

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@three11/infinite-scroll

Infinite scroll: Load more items as you scroll down

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

GitHub release GitHub issues GitHub last commit Build Status npm npm Analytics

Infinite Scroll

A module for loading more items as you scroll the page down.

See a demo and the documentation.

Install

npm i @three11/infinite-scroll

or

yarn add @three11/infinite-scroll

Usage

First, import the module:

import InfiniteScroll from '@three11/infinite-scroll';

Then initialize a new instance of the module:

const infiniteScroll = new InfiniteScroll();

Settings

The default settings are:

NameTypeDescriptionDefault value
elementstringCSS selector for the items container'.js-infinite'
nextstringCSS selector for the next page link'.js-infinite__next'
itemstringCSS selector for the item which will be loaded'.js-infinite__item'
disabledClassstringClass name to add to the next page link'disabled'
hiddenClassstringClass name to add to the next page link'hidden'
responseTypeDOMParserSupportedTypeType of the AJAX response'text/html'
requestMethod'GET', 'POST', 'PUT', 'PATCH'HTTP request type'GET'
viewportTriggerPointnumberPosition in the viewport after which the loading will startwindow.innerHeight / 2
debounceTimenumberTime to wait before triggering the next loading (in ms)500
onCompletefunctionA function to run after successful loadnull

Typescript

This module offers full Typescript support out of the box.

License

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

Keywords

FAQs

Package last updated on 23 Jan 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc