GithubHelp home page GithubHelp logo

hexi1997 / react-flip-countdown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rumess/react-flip-countdown

0.0 0.0 0.0 3.03 MB

The React Flip Countdown Component.

HTML 6.34% JavaScript 70.47% CSS 0.56% SCSS 22.63%

react-flip-countdown's Introduction

@rumess/react-flip-countdown

The React Flip Countdown Component.

NPM Version NPM Downloads JavaScript Style Guide

DEMO

Install

Using npm:

npm install @rumess/react-flip-countdown

Using yarn:

yarn add @rumess/react-flip-countdown

Usage

Basic

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleBasic extends Component {
    render() {
        return (
            <FlipCountdown
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

Size

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleSize extends Component {
    render() {
        return (
            <FlipCountdown
                size='large' // Options (Default: medium): large, medium, small, extra-small.
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

Theme

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleTheme extends Component {
    render() {
        return (
            <FlipCountdown
                theme='dark' // Options (Default: dark): dark, light.
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

Title Position

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleTitlePosition extends Component {
    render() {
        return (
            <FlipCountdown
                titlePosition='top' // Options (Default: top): top, bottom.
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

Change title

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleChangeTitle extends Component {
    render() {
        return (
            <FlipCountdown
                yearTitle='Year'
                monthTitle='Months'
                dayTitle='Days'
                hourTitle='Hours'
                minuteTitle='Minutes'
                secondTitle='Seconds'
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

Hide certain sections

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleHideSection extends Component {
    render() {
        return (
            <FlipCountdown
                hideYear
                hideMonth
                hideDay
                // hideHour
                // hideMinute
                // hideSecond
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

End as Zero

import React, { Component } from 'react';

import FlipCountdown from '@rumess/react-flip-countdown';

class ExampleHideSection extends Component {
    render() {
        return (
            <FlipCountdown
                endAtZero
                endAt={'2022-12-12 01:26:58'} // Date/Time
            />
        );
    }
}

License

MIT © rumess

react-flip-countdown's People

Contributors

rumeshudash avatar aminsource 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.