Skip to content
A roll, as of parchment or papyrus, used especially in the writing of a document.
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
dist
src
.babelrc
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
CODEOWNERS
LICENSE
README.md
jest.config.js
package.json
webpack.development.config.js
webpack.production.config.js
yarn.lock

README.md

NPM Bundle Size Supported by TRBL

React Scroll Info

A roll, as of parchment or papyrus, used especially in the writing of a document.

Quick Start

Installation

$ yarn add @trbl/react-scroll-info

Composition

  import React from 'react';
  import { ScrollInfoProvider, withScrollInfo, useScrollInfo } from '@trbl/react-scroll-info';

  const WithScrollInfo = withScrollInfo(({ scrollInfo }) => <div>{scrollInfo}</div>);
  const UseScrollInfo = () => <div>{useScrollInfo()}</div>;

  const App = () => {
    return (
      <ScrollInfoProvider>
        <WithScrollInfo />
        <UseScrollInfo />
      </ScrollInfoProvider>
    )
  }

  export default App;

Demo

To demo locally, clone the repo and

$ yarn
$ yarn dev
$ open http://localhost:3000

Documentation

All available props can be found via the references below:

Contribution

Help us, or let us help you help us.

License

MIT Copyright (c) TRBL, LLC

You can’t perform that action at this time.