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

react-scrollbars

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scrollbars

Stateful scrollbar component for React

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install react-scrollbars --save

Basic usage

var React = require('react');
var ScrollbarWrapper = require('react-scrollbar').ScrollbarWrapper;

var Component = React.createClass({
  render: function() {
    return (
      <ScrollbarWrapper>
        <div>
            content
        </div>
      </ScrollbarWrapper>
    );
  }
});

module.exports = Component;

Properties

vertical={true}

values: true, false

Force hide the scrollbars on the y-axis, regardless of what overflow value is set in the CSS. Works best with overflow-y: hidden.

horizontal={true}

values: true, false

Force hide the scrollbars on the x-axis, regardless of what overflow value is set in the CSS. Works best with overflow-x: hidden.

offest={2}

values: any integer

Changes the space (margin) around the scrollbar component.

scrollbarThickness={10}

values: any integer

Controls the width (in y-axis) or height (in x-axis) of the scrollbar.

Styles

For optimized behavior add the following definitions to your stylesheets:

  .ScrollbarContainer--scrolling {
    -webkit-touch-callout: none;
    user-select: none;
  }
  
  .ScrollbarContainer>div::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  
  .ScrollbarContainer>div::scrollbar {
    width: 0;
    height: 0;
  }

Keywords

FAQs

Package last updated on 21 Jul 2015

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