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

supply-chain-viz

v1.0.0

Published

Interactive supply chain visualization component with customizable themes

Readme

Supply Chain Viz

An interactive supply chain visualization component built with React and TypeScript. Render complex supplier networks with smooth animations, risk indicators, and fully customizable themes.

Features

  • 🎨 Customizable Themes — 3 built-in presets (teal, sunset, ocean) + create your own
  • 🎬 Smooth Animations — Scroll-driven stage progression with Framer Motion
  • ⚠️ Risk Indicators — Visual overlays for supply chain risks
  • 📱 Responsive — Adapts to any screen size
  • 🎯 Easy Integration — Drop-in React component with TypeScript support

Installation

npm install supply-chain-viz

Basic Usage

import React from 'react';
import { SupplyChainDiscovery, APP_THEME } from 'supply-chain-viz';

export function App() {
  return (
    <SupplyChainDiscovery 
      theme={APP_THEME.pluginTheme}
      stage={1}
    />
  );
}

Customization

Using Built-in Themes

Switch between presets by changing one line in theme-config.ts:

export const ACTIVE_THEME = 'teal'; // 'teal' | 'sunset' | 'ocean'

Then import and use:

import { APP_THEME } from 'supply-chain-viz';

<SupplyChainDiscovery theme={APP_THEME.pluginTheme} />

Custom Theme

Pass a custom theme object:

import { SupplyChainDiscovery, SCDTheme } from 'supply-chain-viz';

const customTheme: SCDTheme = {
  canvasBackground: '#111111',
  accent: '#00D9FF',
  companyFill: '#1a1a2e',
  risk: '#FF3B5A',
  riskLight: '#FF3B5A40',
  textPrimary: '#FFFFFF',
  textMuted: '#999999',
  starColor: '180, 230, 255',
  tierColors: ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FFA07A'],
};

<SupplyChainDiscovery theme={customTheme} />

Theme Configuration

All colors are tokenized in the SCDTheme interface:

| Token | Purpose | |-------|---------| | canvasBackground | Canvas/viewport background | | accent | Primary brand color (links, highlights) | | companyFill | Node/company background color | | risk | Alert/risk indicator color | | riskLight | Light variant of risk color (backgrounds) | | textPrimary | Primary text color | | textMuted | Secondary/muted text | | starColor | Particle/star RGB color (space-separated: "R G B") | | tierColors | Array of 4 colors for supplier tiers 1–4 |

Component Props

interface SupplyChainDiscoveryProps {
  theme?: Partial<SCDTheme>;  // Optional custom theme
  stage?: number;              // Current animation stage (0-3)
  onStageChange?: (stage: number) => void; // Stage change callback
}

Building from Source

To build the library:

npm run build:lib

Output: dist/supply-chain-viz.es.js and dist/supply-chain-viz.umd.js

To run locally:

npm run dev

Examples

Scroll-Driven Animation

The component automatically animates based on scroll position. Use the stage prop to manually control animation:

const [stage, setStage] = useState(0);

return (
  <>
    <SupplyChainDiscovery 
      theme={APP_THEME.pluginTheme}
      stage={stage}
      onStageChange={setStage}
    />
    <button onClick={() => setStage(stage + 1)}>Next Stage</button>
  </>
);

Dark Theme

import { SupplyChainDiscovery } from 'supply-chain-viz';

<SupplyChainDiscovery 
  theme={{
    canvasBackground: '#0a0e27',
    accent: '#00D9FF',
    companyFill: '#1a1a2e',
    risk: '#FF3B5A',
    riskLight: '#FF3B5A40',
    textPrimary: '#FFFFFF',
    textMuted: '#888888',
    starColor: '100, 150, 200',
    tierColors: ['#A8DADC', '#457B9D', '#1D3557', '#F1FAEE'],
  }}
/>

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+

License

MIT

Support

For issues, feature requests, or questions, please open an issue on GitHub.