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

@planet/react-scroll-view

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planet/react-scroll-view

A Rect Scroll View component

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
6
Weekly downloads
 
Created
Source

react-scroll-view

A scroll view React component optimized for large numbers of items.

Installation

JavaScript

First,

npm install @planet/react-scroll-view

Then in your code you can

var ScrollView = require('@planet/react-scroll-view')

css

Both a .less and a compiled .css file are provided with the module.

Usage

var itemHeight = 50;
var itemStyle = {
  height: itemHeight
}
<ScrollView
    itemCount={50}
    itemHeight={itemHeight}
    itemAtPosition={function(position) {
      return (
        <div className="my-item" style={itemStyle}>I am number {position}</div>
      )
    }}/>

The supported properties are:

  • itemCount : Required. the number of items in the scroll view
  • itemHeight: Required. the height of each item. All items must have the same height.
  • itemAtPosition : Required. a function that, when invoked, will return the jsx representing the item at the specified position
  • itemPreloadCount : how many items are loaded outside the visible area of the scroll view. Defaults to 10
  • nativeScrollbar : a boolean value. if set to true, the native scrollbar will be used instead of the custom one. Defaults to false.
  • onScroll: optional callback that will be invoked on every scroll event.

FAQs

Package last updated on 12 Feb 2016

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