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 🙏

© 2025 – Pkg Stats / Ryan Hefner

gsap-timeline-viewer

v0.1.26

Published

A lightweight, framework-agnostic timeline viewer for GSAP animations

Readme

GSAP Timeline Viewer

A lightweight, framework-agnostic development tool for visualizing and debugging GSAP timelines. Inspect your animations with a visual timeline panel.

GSAP Timeline Viewer

~14 KB gzipped | Works with React, Vue, Angular, Svelte, or vanilla JS

▶ Try it on CodePen

Features

  • Auto-detection - Automatically captures all gsap.timeline() calls
  • Visual timeline - Colored tracks for each tween with labels
  • Playback controls - Play/pause, reverse, skip, speed (0.25x–4x), loop modes
  • Playrange bar - Drag handles to set playback boundaries
  • Ease curve visualization - Toggle to see ease curves as track shapes
  • Repeat/yoyo curves - Ease curves visualize repeat iterations and yoyo direction
  • Nested timeline groups - Collapsible groups for child timelines with tween counts
  • Stagger expansion - Expand staggered animations to see individual targets
  • Scrubbing - Click or drag anywhere on the timeline
  • Resizable & collapsible - Drag to resize, minimize when not in use
  • Keyboard shortcuts - Full keyboard control for playback and navigation
  • Persistent settings - Panel size, playrange, and preferences saved

Quick Start

npm install gsap gsap-timeline-viewer
import gsap from 'gsap';
import { TimelineViewer } from 'gsap-timeline-viewer';

// One line to activate (pass gsap instance)
TimelineViewer.create({ gsap });

// Your animations are auto-detected
const tl = gsap.timeline({ id: 'My Animation' });
tl.to('.box', { x: 100, duration: 1, id: 'Slide Right' })
  .to('.box', { y: 50, duration: 0.5, repeat: 2, yoyo: true, id: 'Bounce' });

Tip: Add id to timelines and tweens for better labels in the viewer.

Script Tag (CDN)

<script src="https://unpkg.com/gsap"></script>
<script src="https://unpkg.com/gsap-timeline-viewer"></script>

<script>
  GSAPTimelineViewer.TimelineViewer.create();

  gsap.timeline({ id: 'My Animation' })
    .to('.box', { x: 100, duration: 1, id: 'Slide Right' })
    .to('.box', { y: 50, duration: 0.5, repeat: 2, yoyo: true, id: 'Bounce' });
</script>

API

TimelineViewer.create(config?)

Creates and attaches the viewer. Call once - subsequent calls return the existing instance.

TimelineViewer.create({
  gsap: gsap,                      // Required for ES modules, optional for script tag
  height: 200,                     // Initial panel height (default: 200)
  collapsed: false,                // Start collapsed (default: false)
  defaultTimeline: 'My Animation', // Auto-select this timeline
  autoDetect: true,                // Auto-detect timelines (default: true)
});

TimelineViewer.register(name, timeline)

Manually register a timeline:

const tl = gsap.timeline({ paused: true });
TimelineViewer.register('Hero Animation', tl);

TimelineViewer.unregister(name)

Remove a timeline from the viewer.

TimelineViewer.getInstance()

Get the current viewer instance:

const viewer = TimelineViewer.getInstance();
viewer.select('Other Timeline');

Keyboard Shortcuts

| Key | Action | |-----|--------| | Space | Play / Pause | | R | Reverse | | J | Jump to previous point | | K | Jump to next point | | O | Oneshot mode | | L | Loop mode | | P | Ping-pong mode | | [ | Set playrange start | | ] | Set playrange end | | \ | Reset playrange |

Browser Support

Works in all modern browsers that support Web Components (Chrome, Firefox, Safari, Edge).

License

MIT