@tmnrp/react-progressbar
TypeScript icon, indicating that this package has built-in type declarations

1.0.23 • Public • Published

@tmnrp/react-progressbar

@tmnrp/react-progressbar is a lightweight latest treanding markup to display the progressbar.

Features

  • Configurable height, frequency and all html attributes with ease.

Examples link

https://tmnrp-react-ui.vercel.app/progressbar

Installation link

$ npm i @tmnrp/react-progressbar

Properties

@tmnrp/react-progressbar (IProgressbar) is currently extended with the following properties.

Properties type Description
frequency number Duration in which the progressbar should increment.
height number Height of the progressbar.
...props HTML div props Common HTML div properties that needs to be applied to the crumb.

IProgressbarMethods is currently extended with the following methods.

Properties type Description
activate function Starts the progressbar.
kill function Stops the progressbar.

Implementation for single page breadcrumb

import { Progressbar, IProgressbarMethods } from "@tmnrp/react-progressbar";

const App = () => {
  const pbRef = useRef<IProgressbarMethods>(null);

  //
  return (
    <div className="flex items-center justify-center w-full h-full">
      <Progressbar ref={pbRef} className="bg-red-400" frequency={100} height={10} />
      <button
        onClick={() => {
          pbRef?.current?.activate();
        }}
      >
        Activate
      </button>

      <button
        onClick={() => {
          pbRef?.current?.kill();
        }}
      >
        Kill
      </button>
    </div>
  );
};

Todos

  • Let me know :-)

License

MIT Tony Martin

Package Sidebar

Install

npm i @tmnrp/react-progressbar

Weekly Downloads

4

Version

1.0.23

License

MIT

Unpacked Size

23.1 kB

Total Files

9

Last publish

Collaborators

  • tmnrp