npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@toankhontech/arctimer-react

v0.1.0

Published

React web countdown circle timer component with SVG rendering

Readme

@toankhontech/arctimer-react

Smooth, 60fps countdown circle timer for React.

Part of the ArcTimer monorepo. Also available for React Native and Expo.

Install

npm install @toankhontech/arctimer-react

Quick Start

import { CountdownCircleTimer } from '@toankhontech/arctimer-react'

function App() {
  return (
    <CountdownCircleTimer
      isPlaying
      duration={60}
      colors={['#3498DB', '#F39C12', '#E74C3C']}
      colorsTime={[60, 30, 0]}
    >
      {({ remainingTime, color }) => (
        <span style={{ color, fontSize: 32 }}>{remainingTime}</span>
      )}
    </CountdownCircleTimer>
  )
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | duration | number | required | Duration in seconds | | isPlaying | boolean | false | Start/stop the timer | | colors | string \| string[] | '#3498DB' | Single color or array for gradient | | colorsTime | number[] | auto | Time thresholds for color transitions | | size | number | 180 | Width and height in px | | strokeWidth | number | 12 | Arc stroke width | | trailColor | string | '#d9d9d9' | Background circle color | | easing | string \| object | 'linear' | 'linear', 'easeIn', 'easeOut', 'easeInOut', or spring config | | isCountUp | boolean | false | Count up instead of down | | initialRemainingTime | number | — | Start from a specific time | | children | (info) => ReactNode | — | Render function for center content | | onComplete | () => void \| { shouldRepeat, delay } | — | Fires when timer reaches zero | | onUpdate | (remainingTime) => void | — | Fires every second |

Animation Effects

| Prop | Type | Description | |------|------|-------------| | bounceOnComplete | boolean | Scale bounce when timer completes | | bounceAt | number[] | Bounce at specific remaining times (e.g. [10, 5]) | | pulse | { interval, scale, opacity } | Periodic breathing animation |

Render Function

The children render function receives:

{
  remainingTime: number  // seconds left (integer)
  elapsedTime: number    // seconds elapsed (integer)
  color: string          // current interpolated color
  progress: number       // 0 to 1
  isComplete: boolean    // true when timer is done
}

Imperative API

Control the timer programmatically via ref:

import { useRef } from 'react'
import { CountdownCircleTimer, type TimerRef } from '@toankhontech/arctimer-react'

function App() {
  const timerRef = useRef<TimerRef>(null)

  return (
    <>
      <CountdownCircleTimer ref={timerRef} duration={60} colors="#3498DB">
        {({ remainingTime }) => remainingTime}
      </CountdownCircleTimer>
      <button onClick={() => timerRef.current?.pause()}>Pause</button>
      <button onClick={() => timerRef.current?.play()}>Play</button>
      <button onClick={() => timerRef.current?.reset()}>Reset</button>
    </>
  )
}

Multi-Timer (Sequential / Parallel)

Run timers one after another, or all at once:

import { TimerGroup, CountdownCircleTimer } from '@toankhontech/arctimer-react'

<TimerGroup mode="sequential" isPlaying onGroupComplete={() => alert('Done!')}>
  <CountdownCircleTimer duration={1500} colors="#E74C3C" />
  <CountdownCircleTimer duration={300} colors="#2ECC71" />
</TimerGroup>

Theming

import { TimerThemeProvider, darkTheme } from '@toankhontech/arctimer-themes'

<TimerThemeProvider theme={darkTheme}>
  <CountdownCircleTimer duration={60} colors="#00D2FF" />
</TimerThemeProvider>

5 built-in themes: defaultTheme, darkTheme, minimalTheme, vibrantTheme, neonTheme

Easing & Spring Physics

// Built-in easing
<CountdownCircleTimer easing="easeInOut" ... />

// Spring physics
<CountdownCircleTimer easing={{ type: 'spring', tension: 170, friction: 26 }} ... />

Migrating from react-countdown-circle-timer

Drop-in replacement:

- import { CountdownCircleTimer } from 'react-countdown-circle-timer'
+ import { CountdownCircleTimer } from '@toankhontech/arctimer-react'

Links

License

MIT