0.1.5 • Published 2 years ago

@tmnrp/react-progressbar-line v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@tmnrp/react-progressbar-line

@tmnrp/react-progressbar-line is a lightweight latest treanding markup to display the progressbar as a line at the top of the page.

eg: Youtube loading

Features

  • Render progressbar with configurable background color, height and frequency
  • Inbuilt activate and kill implementation. (no more self state handling)

Examples link

https://tmnrp.github.io/react-lib/

Installation link

$ npm i @tmnrp/react-progressbar-line

Properties

@tmnrp/react-progressbar-line is currently extended with the following properties.

PropertiestypeDescription
bgColorstringBackground color of the progressbar line
heightintegerHeight of the progressbar line
frequencyintegerInterval in which progressbar should step ahead

Inbuilt methods

@tmnrp/react-progressbar-line is currently extended with the following ref methods.

MethodsDescription
activateStarts movement of progress bar
killKill and the progressbar away by directly completing the remaining distance

Implementation

import {ReactProgressbarLine} from "@tmnrp/react-progressbar-line";
export const App = () => {
  const lpref = useRef();

  //
  return (<>
      <ReactProgressbarLine ref={lpref} />
      <div>
        <div>
          <div>React Progressbar Line</div>
          <div>
            <div
              onClick={() => {
                lpref?.current?.activate();
              }}
            >
              Start
            </div>
            <div
              onClick={() => {
                lpref?.current?.kill();
              }}
            >
              Stop
            </div>
          </div>
        </div>
      </div>
    </>);
};

Todos

  • Let me know :-)

License

MIT Tony Martin

0.1.5

2 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago