New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-custom-scroll

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-custom-scroll

An easily designable, cross browser (!!), custom scroll with ReactJS Animations and scroll rate **exactly** like native scroll

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by24.11%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version

React-Custom-Scroll

An easily designable, cross browser (!!), custom scroll with ReactJS
Animations and scroll rate exactly like native scroll

See a working demo

Why do I need this ?

  • Same design on all browsers
  • Scrollbar above content instead of floating to the side - same layout on scrolled content as not scrolled content

How to use ?

wrap your content with the custom scroll component remove overflow style properties from your content root component - The custom scroll will take care of it

<customScroll>
  your content
</customScroll>

Options (react props)

  • allowOuterScroll : boolean, default false. Blocks outer scroll while scrolling the content
  • heightRelativeToParent : string, default undefined. Content height limit is relative to parent - the value should be the height limit.
  • onScroll - function, default undefined. Listener that will be called on each scroll.
  • addScrolledClass - boolean, default false. If true, will add a css class 'content-scrolled' while being scrolled.
  • freezePosition - boolean, default false. When true, will prevent scrolling.
Example for heightRelativeToParent
<customScroll heightRelativeToParent="calc(100% - 20px)">
  your content
</customScroll>  

It doesn't work, please help me

  • Check if you forgot to remove 'overflow' properties from the content root element.
  • Check if your height limit is relative to parent, and you didn't use heightRelativeToParent prop.

Keywords

FAQs

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