New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-spinner-timer

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-spinner-timer

React SVG Spinner for update actions

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
152
decreased by-19.15%
Maintainers
3
Weekly downloads
 
Created
Source

NPM COVERAGE

React-Spinner-Timer

The React Spinner Timer for React.

Circular countdown timer with progressive animation.

Component

React Spinner Timer

Installation and usage

To install React Spinner Timer you can run:

yarn add react-spinner-timer

or

npm install react-spinner-timer

To use:

import React from "react";
import ReactSpinnerTimer from "react-spinner-timer";

function App() {
  const handleChange = (lap) => {
    if (lap.isFinish)
      console.log("Finished!!");
    else
      console.log("Running!! Lap:", lap.actualLap);
  };
  return (
    <ReactSpinnerTimer
      timeInSeconds={60}
      totalLaps={60}
      isRefresh={false}
      onLapInteraction={handleChange}
      isPause={false}
    />
  );
}
export default App;

See another example at Code Sandbox

Props

Common props you need to specify:

PropTypeDescription
timeInSecondsNumberComponent lap time
totalLapsNumberNumber of laps
onLapInteractionFunctionWhen you complete a lap, what to do?
isRefreshBooleanRefresh the lap (Optional)
isPauseBooleanDefault (true) pause time count

Function callback of OnLapInteraction

PropTypeDescription
actualLapNumberLap actual
totalLapsNumberNumber of total laps
isFinishBooleanInteractions is finished
timeInSecondsNumberTime of lap

Thanks

Thanks for downloading, use wisely!

Keywords

FAQs

Package last updated on 24 Feb 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc