GithubHelp home page GithubHelp logo

ashokdavuluri / react-component-countdown-timer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from savalanpour/react-component-countdown-timer

0.0 0.0 0.0 1.12 MB

This is a simple count down timer react component.

License: MIT License

HTML 1.25% JavaScript 63.86% CSS 23.10% SCSS 11.79%

react-component-countdown-timer's Introduction

React component Countdown Timer

This is a simple countdown timer react component.

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

Name Type Default Description
className string '' Additional CSS class for the root DOM node
id string '' Additional id for the root DOM node
count number 0 The count value of the timer base on second
border boolean false If the value is true, it means a react-component-countdown-timer has a border
showTitle boolean false If the value is true, it means a react-component-countdown-timer has a title top of each section
direction right or left left Value 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.
noPoints boolean false If vertical is true, the react-component-countdown-timer will be : between each section .
color string #000
backgroundColor string #fff
responsive boolean false If true, with is responsive.
size number 18 count number font size
labelSize number 12 if showTitle is true this set label font size
responsive boolean false If true, with is responsive.
hideDay boolean false If true, hide day.
hideHours boolean false If true, hide hours .
dayTitle string Day
hourTitle string Hour
minuteTitle string Min
secondTitle string Sec
onEnd Function () => {}

License

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

react-component-countdown-timer's People

Contributors

savalanpour avatar dependabot[bot] avatar rahi-nz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.