1.0.0 • Published 4 years ago

read-progressbar v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Read progressbar

When you want to show the user how much they have scrolled by showing a progressbar at the top of the window. The progressbar is commonly used when you have a lot of text content on your site.

Installation

    npm i read-progressbar

Demo

Examples

import React, { Component } from 'react';
import { render } from 'react-dom';
import ReadProgressBar from 'read-progressbar';

interface AppProps {}
interface AppState {}

class App extends Component<AppProps, AppState> {
  myRef;

  constructor(props) {
    super(props);
    this.myRef = React.createRef();
  }

  render() {
    return (
      <div>
        <ReadProgressBar attachTo={this.myRef} />
        <div style={{ height: '2000px' }} ref={this.myRef}></div>
      </div>
    );
  }
}

render(<App />, document.getElementById('root'));

API


PropTypeDescription
attachToRefThe container you want to track
colorstringthe color of the progressbar
backgroundColorstringThe background color of the progressbar
1.0.0

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago