🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@brianmcallister/react-auto-scroll

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brianmcallister/react-auto-scroll

<!-- [![codecov](https://codecov.io/gh/brianmcallister/highlight-text/branch/master/graph/badge.svg)](https://codecov.io/gh/brianmcallister/highlight-text) -->

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
3.4K
54.83%
Maintainers
1
Weekly downloads
 
Created
Source

@brianmcallister/react-auto-scroll

CircleCI npm version

react-auto-scroll is a React component that automatically scrolls a containing element to the bottom.

Demo

Check out the hosted demo right here: https://react-auto-scroll.netlify.com/

Installation

npm install @brianmcallister/react-auto-scroll

API

AutoScroll

This is the default export. Use this React component to scroll a container to the bottom when the children change.

interface Props {
  // ID attribute of the checkbox.
  checkBoxId?: string;
  // Children to render in the scroll container.
  children: React.ReactNode;
  // Extra CSS class names.
  className?: string;
  // Height value of the scroll container.
  height?: number;
  // Text to use for the auto scroll option.
  optionText?: string;
  // Prevent all mouse interaction with the scroll conatiner.
  preventInteraction?: boolean;
  // Show the auto scroll option.
  showOption?: boolean;
}

Example

import AutoScroll from '@brianmcallister/react-auto-scroll';

const MyComponent = ({ someContent }) => (
  <AutoScroll>
    {someContent}
  </AutoScroll>
);

FAQs

Package last updated on 12 Nov 2019

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