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

react-dynamic-lazy-virtual-scroll

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dynamic-lazy-virtual-scroll

React dynamic lazy virtual scroll library

  • 0.1.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

react-dynamic-lazy-virtual-scroll

React Dynamic Virtual Scroll is a lightweight and customizable library for efficiently rendering large lists in React applications. By utilizing the virtual scrolling technique, it renders only the visible items in the list, resulting in faster load times and smoother scrolling experiences.

Installation

npm install react-dynamic-lazy-virtual-scroll

No external dependencies so no need to worry about security and package size.

Usage

  • Import component.

    import VirtualScroll from "react-dynamic-lazy-virtual-scroll";
    
  • Add component:

    <VirtualScroll
        className="List"
        minItemHeight={40}
        totalLength={100}
        renderItem={(rowIndex) => {
            return (
              <div className="List-item">
                <h3>List item: {rowIndex}</h3>
              </div>
            );
        }}
    />
    

Props Table

nametyperequireddefaultdescription
minItemHeightnumber*Smallest item height to calculate placeholder spacing.
totalLengthnumber*Total amount of items to be displayed.
renderItem(rowIndex) => React.ReactNode*Function to display items for specific index values. Indexed at 0.
lengthnumber30Total number of items to be rendered in the dom.
buffernumber10Total number of items to be displayed in the DOM before and after the required items.

Keywords

FAQs

Package last updated on 27 Apr 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