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

pullcord

v0.1.0

Published

a ceiling pull-cord for react with a real rope

Readme

pullcord

A ceiling pull-cord for React. The rope is a real verlet sim (nodes + distance constraints), so it hangs under gravity, swings when you grab it and settles back on its own. I use it as a theme switch.

Everything runs in a single requestAnimationFrame loop that writes the DOM through refs, and the loop goes to sleep once the rope stops moving. So an idle cord costs basically nothing.

Live demo + the rest of the FeralUI stuff: https://github.com/mortspace/feralui

install

npm install pullcord

usage

import { PullCord } from 'pullcord'
import 'pullcord/pullcord.css'

function App() {
  const [dark, setDark] = useState(true)

  return (
    <PullCord
      onPull={() => setDark(d => !d)}
      pulled={!dark}
      ariaLabel="Toggle theme"
    />
  )
}

Mount it anywhere, it fixes itself to the top of the viewport. onPull fires when the pull crosses the detent depth, like a real pull-chain it clicks mid-pull, not on release. Click and Enter work too so it's fine with a keyboard.

Props: onPull, pulled (mirrored to aria-pressed), ariaLabel, noEntrance (skip the drop-in), config (physics overrides), className.

the feel

All the physics knobs sit on the config prop and get read fresh every frame, so you can change them live:

<PullCord
  config={{
    gravity: 1250,   // hang tension / fall speed
    damping: 0.94,   // higher = snappier retract
    iterations: 20,  // rope stiffness
    stretchMax: 26,  // how deep you can pull
  }}
/>

The full list (actuation depth, velocity cap, sleep threshold...) is in config.ts, every field has a comment.

where it hangs

CSS vars on any ancestor:

:root {
  --pullcord-top: 0px;
  --pullcord-right: 7rem;
  --pullcord-z: 5;
  --pullcord-ink: rgba(255, 255, 255, 0.24);
}

Respects prefers-reduced-motion. MIT.