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

react-timeline-dragger

v1.0.4

Published

A React timeline component with Cesium-like time navigation, drag-to-seek, playback controls, and auto-play features

Readme

React Timeline Dragger

一个类 Cesium 风格的 React 时间轴组件,支持拖拽定位、播放控制和日期切换。

特性

  • 🎚️ 拖拽定位 - 固定竖线在中间,拖拽时间轴改变时间
  • ▶️ 播放控制 - 支持播放/暂停、倍速调节
  • 📅 日期选择 - 弹出日历快速切换日期
  • 🎯 自适应刻度 - 根据可见范围自动调整刻度密度
  • 📦 轻量无依赖 - 仅依赖 React,无其他运行时依赖

安装

npm install react-timeline-dragger

使用

import Timeline from 'react-timeline-dragger';
import 'react-timeline-dragger/dist/index.css';

function App() {
  const [currentTime, setCurrentTime] = useState(new Date());

  return (
    <Timeline
      currentTime={currentTime}
      onTimeChange={setCurrentTime}
      visibleDuration={2 * 60 * 60 * 1000} // 可见范围:2小时
    />
  );
}

API

Props

| 属性 | 类型 | 默认值 | 说明 | |------|------|--------|------| | currentTime | Date | - | 当前时间(受控) | | onTimeChange | (time: Date) => void | - | 时间变化回调 | | visibleDuration | number | 2 * 60 * 60 * 1000 | 可见时间范围(毫秒) | | minDuration | number | 2 * 60 * 60 * 1000 | 最小可见范围 | | maxDuration | number | 3 * 24 * 60 * 60 * 1000 | 最大可见范围 | | playbackInterval | number | 100 | 播放间隔(毫秒) | | showControls | boolean | true | 显示控制栏 | | dateFormat | string | 'YYYY-MM-DD HH:mm:ss' | 日期格式 |

开发

# 安装依赖
npm install

# 启动开发服务器
npm run dev

# 构建库
npm run build:lib

License

MIT