Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-component-countdown-timer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-component-countdown-timer

Count down timer component for react

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
284
decreased by-3.07%
Maintainers
1
Weekly downloads
 
Created
Source

React component Countdown Timer

This is a simple countdown timer react component.

Demo

The demo app source code lives inside the src/docs folder.

Documentation

Installation

npm

npm install react-component-countdown-timer --save

⚠️ Also install react-component-countdown-timer for css

@import "~react-component-countdown-timer/lib/styles.css";

Example

import React from "react";
import CountdownTimer from "react-component-countdown-timer";

class SimpleCountdownTimer extends React.Component {
  render() {
    var settings = {
      count: 5432,
      border: true,
      showTitle: true,
      noPoints: true,
    };
    return (
      <CountdownTimer {...settings} />
    );
  }
}

OR

import React from "react";
import CountdownTimer from "react-component-countdown-timer";

class SimpleCountdownTimer extends React.Component {
  render() {
    return (
      <CountdownTimer count={5432} border showTitle noPoints />
    );
  }
}

Common API

NameTypeDefaultDescription
classNamestring''Additional CSS class for the root DOM node
countnumber0The count value of the timer base on second
borderbooleanfalseIf the value is true, it means a react-component-countdown-timer has a border
showTitlebooleanfalseIf the value is true, it means a react-component-countdown-timer has a title top of each section
directionright or leftleftValue to be added or subtracted on each step the slider makes. Must be greater than zero, and max - min should be evenly divisible by the step value.
When marks is not an empty object, step can be set to null, to make marks as steps.
noPointsbooleanfalseIf vertical is true, the react-component-countdown-timer will be : between each section .
colorstring#000
backgroundColorstring#fff
responsivebooleanfalseIf true, with is responsive.
sizenumber18count number font size
labelSizenumber12if showTitle is true this set label font size
responsivebooleanfalseIf true, with is responsive.
hideDaybooleanfalseIf true, hide day.
hideHoursbooleanfalseIf true, hide hours .
dayTitlestringDay
hourTitlestringHour
minuteTitlestringMin
secondTitlestringSec
onEndFunction() => {}

License

react-component-countdown-timer is released under the MIT license.

FAQs

Package last updated on 01 Apr 2020

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