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

@multitrack/svelte

v0.1.1

Published

Svelte 5 bindings for @multitrack/core

Readme

@multitrack/svelte

Svelte 5 bindings for @multitrack/core — a scroll-driven animation engine with a multi-track timeline architecture.

Install

npm install @multitrack/core @multitrack/svelte

Quick start

<!-- App.svelte -->
<script lang="ts">
  import { MultitrackProvider, ScrollContainer, FixedStage, Show } from "@multitrack/svelte";
  import type { StepConfig } from "@multitrack/core";
  import IntroSection from "./IntroSection.svelte";
  import FeatureSection from "./FeatureSection.svelte";

  const config: StepConfig[] = [
    { name: "intro", duration: 3, track: "main", easing: "linear" },
    { name: "feature", duration: 5, track: "main" },
    { name: "outro", duration: 3, track: "main", easing: "linear" },
  ];
</script>

<MultitrackProvider {config}>
  <ScrollContainer>
    <FixedStage>
      <Show when="intro">
        <IntroSection />
      </Show>
      <Show when="feature">
        <FeatureSection />
      </Show>
    </FixedStage>
  </ScrollContainer>
</MultitrackProvider>
<!-- IntroSection.svelte -->
<script lang="ts">
  import { useStep } from "@multitrack/svelte";

  const step = useStep("intro");
</script>

<div style:opacity={step.opacity} style:transform="translateY({(1 - step.opacity) * 40}px)">
  <h1>Welcome</h1>
</div>

API

<MultitrackProvider>

Wraps your app and creates the timeline instance. All composables and components must be used within this provider.

<MultitrackProvider {config} {breakpoints} devtools>
  {@render children()}
</MultitrackProvider>

Composables

useStep(name)

Returns a reactive object with opacity and isActive getters for a single step.

useOpacities()

Returns a reactive object with a current getter containing an Opacities record ({ [stepName]: number }) for all steps.

useScrollProgress()

Returns a reactive object with scrollPercentage, currentStep, and totalSteps getters.

useTimeline()

Returns the underlying Timeline instance for advanced use cases.

Components

<ScrollContainer>

The scrollable container that drives the timeline. Renders a <div> with the correct scroll height.

<FixedStage>

A fixed-position overlay inside ScrollContainer for content that stays in the viewport while scrolling.

<Show when="stepName">

Conditionally renders children when the named step is active (opacity > 0).

DevTools

Enable the Chrome DevTools integration by passing the devtools prop to the provider:

<MultitrackProvider {config} devtools>
  {@render children()}
</MultitrackProvider>

This exposes timeline state to the @multitrack/devtools Chrome extension, giving you a live timeline inspector with playhead visualization, active step opacities, and an event log.

Full example with useStep()

For fine-grained control over individual steps, use the useStep() composable to get reactive opacity and isActive values and drive animations directly:

<!-- App.svelte -->
<script lang="ts">
  import { MultitrackProvider, ScrollContainer, FixedStage, Show } from "@multitrack/svelte";
  import type { StepConfig } from "@multitrack/core";
  import IntroSection from "./IntroSection.svelte";
  import FeatureSection from "./FeatureSection.svelte";
  import Caption from "./Caption.svelte";

  const config: StepConfig[] = [
    { name: "intro", duration: 3, track: "main", easing: "linear" },
    { name: "feature", duration: 5, track: "main" },
    { name: "outro", duration: 3, track: "main", easing: "linear" },

    // Independent text track — overlaps freely with main
    { name: "buffer", duration: 4, track: "text" },
    { name: "caption", duration: 3, track: "text" },
  ];
</script>

<MultitrackProvider {config} devtools>
  <ScrollContainer>
    <FixedStage>
      <Show when="intro">
        <IntroSection />
      </Show>
      <Show when="feature">
        <FeatureSection />
      </Show>
      <Show when="caption">
        <Caption text="Tracks are independent." />
      </Show>
    </FixedStage>
  </ScrollContainer>
</MultitrackProvider>
<!-- IntroSection.svelte -->
<script lang="ts">
  import { useStep } from "@multitrack/svelte";

  const step = useStep("intro");
</script>

<div style:opacity={step.opacity} style:transform="translateY({(1 - step.opacity) * 40}px)">
  <h1>Welcome</h1>
</div>

License

MIT