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

@thefarrelly/web-graph-ui

v0.2.1

Published

Provides a single component export, [FarrellyGraph](src/components/FarrellyGraph.tsx). Given data and props, a 3D graph node (courtesy of [react-force-graph-3d](https://github.com/vasturiano/react-force-graph)) network will be created. Showing the links b

Readme

web-graph-ui

Provides a single component export, FarrellyGraph. Given data and props, a 3D graph node (courtesy of react-force-graph-3d) network will be created. Showing the links between nodes in the network.

Two playback modes are provided, 'start' and 'end'.

  • start
    • first node will be the base URL, i.e thefarrelly.com.
    • subsequent nodes will be added every 500ms, until all nodes have been represented.
  • end
    • all nodes will be represented immediately.

Installation

Use your package manager of choice, we use pnpm.

pnpm add web-graph-ui

Example usage

import
import FarrellyGraph from 'web-graph-ui';

FarrellyGraph is a default export from the pkg.

Usage

Start mode, begin immediately

 <FarrellyGraph
  graphData={dataset}
  beginPlayback={true}
  playbackFrom={'start'}
  config={{width: 640, height: 640}}
/>

End mode, begin immediately

 <FarrellyGraph
  graphData={dataset}
  beginPlayback={true}
  playbackFrom={'end'}
  config={{width: 640, height: 640}}
/>

However, you may want to delay playback. For example, you could allow the user to choose between 'start' and 'end'.

  • To allow the user to choose, provide either playback option ('start' | 'end') and then set beginPlayback to true, e.g.
const [playbackOption, setPlaybackOption] = useState<'start' | 'end'>();
...
{
  playbackOption && <FarrellyGraph
    graphData={dataset}
    beginPlayback={!!playbackOption}
    playbackFrom={playbackOption}
    config={{width: 640, height: 640}}
  />
}

Api reference


Input

| Prop | Type | Default | Description | Required | |---------------|:----------------------------:|:---------:|-------------------------------------------------------------------------------------------------------|----------| | graphData | GraphData<WebNode, LinkNode> | - | Graph node data for each node and it's relations to others. Uses react-force-graph type of same name. | true | | beginPlayback | boolean | false | Will trigger the initial playback | true | | playbackFrom | 'start', or 'end' | - | Defines playback from first node, or entire network | true | | config | FarrellyGraphConfig | undefined | Config, can set width/height for the component | false | | onReady | () => void | undefined | Callback that fires when the component is ready (mounted and data loaded) | false |

graphData example structure

{
  "nodes": [
    {
      "url": "https://thefarrelly.com",
      "name": "/",
      "id": 1
    },
    {
      "url": "https://thefarrelly.com/posts",
      "name": "/posts",
      "id": 2
    },
    ...
  ],
  "links": [
    {
      "source": 1,
      "target": 2
    },
    ...
  ]
}

This follows the data structure defined by react-force-graph-3d.

UI Controls

  • Hold click/tap to rotate.
  • Pinch/scroll to zoom.
  • Click/tap playback (bottom left) to pause, play, restart.
  • Click/tap orbit (bottom right) to start, or stop orbit (orbit only during pause/end).
  • Click/tap notifications (top right) to hide, or show node info notifications.

How to run

  1. clone repo.
  2. install dependencies.
    • pnpm i
  3. run dev.
    • pnpm dev, or pnpm start