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

rax-countdown

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-countdown

Countdown component for Rax.

  • 0.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

Countdown 倒计时

npm

Install

$ npm install rax-countdown --save

Import

import Countdown from 'rax-countdown';

Props

Nametypedefaultdescriberequired
timeRemainingNumber/countdown time, (ms)Yes
intervalNumber1000countdown interval, (ms)No
tplString{d}天{h}时{m}分{s}秒{ms}countdown display templateNo
formatFuncFunction/custom formatted remaining time method, when formatFunc = undefined, tpl is not availableNo
onTickFunction/method of calling when countdown changesNo
onCompleteFunction/method of calling when the countdown is completeNo
timeStyleObject/time digital styleNo
secondStyleObject/second digital styleNo
textStyleObject/text styleNo
timeWrapStyleObject/block style in countdownNo
timeBackgroundObject/background of each time block (can use background image)No
timeBackgroundStyleObject/background style of each time blockNo

Example

// demo
import { createElement, render, Component } from 'rax';
import Countdown from 'rax-countdown';
import View from 'rax-view';

render(<View>
  <Countdown
    timeRemaining={100000}
    tpl="{d}天{h}时{m}分{s}秒"
    onComplete={() => { console.log('complete'); }}
  />  
</View>);

Keywords

FAQs

Package last updated on 28 Jun 2017

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