Giter Site home page Giter Site logo

countdown-react's Introduction

React Countdown

About

这是一个模仿“锤子科技”发布会倒计时的组件,因为觉得这是一个相当独立的组件,可以方便地复用,于是便使用React实现了一下,作为练习。

数字跳动使用背景的图片的移动。

Setup

npm install
npm run test

Usage

// 初始化一个标准时间为倒计时的终点
// 可以设置每一次计时长度step,默认为1s
// 可以设置相关信息

const ENDTIME = '1/1/2018 00:00 AM';
const OPTION = {
  endTime: ENDTIME,
  step: 1,
  imformation: '距离2018年元旦'
}

ReactDOM.render(
   <Countdown option={OPTION} />, document.getElementById('countdown'));

目前只提供了几个简单定制,以后如果有新的想法会继续完善。

Demo

Click here

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.