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

@8aratta/circular-menu

v1.0.1

Published

A radial circular menu for React with carousel mode, momentum physics and customizable visuals

Downloads

72

Readme

@8aratta/circular-menu

A radial circular menu for React with carousel mode and momentum physics.

Installation

npm install @8aratta/circular-menu

Peer dependencies

npm install react react-dom

Basic usage

import { CircularMenu } from '@8aratta/circular-menu';
import { Link } from 'react-router-dom';

const links = [
  { to: '/', label: 'Home' },
  { to: '/about', label: 'About' },
  { to: '/work', label: 'Work' },
  { to: '/contact', label: 'Contact' },
];

const HamburgerIcon = () => (
  <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" strokeWidth="2">
    <line x1="3" y1="6" x2="21" y2="6" />
    <line x1="3" y1="12" x2="21" y2="12" />
    <line x1="3" y1="18" x2="21" y2="18" />
  </svg>
);

const CloseIcon = () => (
  <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" strokeWidth="2">
    <line x1="18" y1="6" x2="6" y2="18" />
    <line x1="6" y1="6" x2="18" y2="18" />
  </svg>
);

export default function Nav() {
  return (
    <nav style={{ position: 'fixed', top: '1.5rem', right: '2rem', zIndex: 200 }}>
      <CircularMenu
        links={links}
        openIcon={<HamburgerIcon />}
        closeIcon={<CloseIcon />}
        renderLink={(link, props) => (
          <Link to={link.to} {...props}>{link.label}</Link>
        )}
        angle="bottom"
        radius={130}
      />
    </nav>
  );
}

Using without a router

<CircularMenu
  links={links}
  openIcon={<HamburgerIcon />}
  closeIcon={<CloseIcon />}
  renderLink={(link, props) => (
    <a href={link.to} {...props}>{link.label}</a>
  )}
/>

Closing on route change (react-router-dom)

The menu does not auto-close on navigation. Pass key={location.pathname} to remount the component on each route change:

import { useLocation } from 'react-router-dom';

function Nav() {
  const location = useLocation();
  return (
    <nav style={{ position: 'fixed', top: '1.5rem', right: '2rem', zIndex: 200 }}>
      <CircularMenu
        key={location.pathname}
        links={links}
        openIcon={<HamburgerIcon />}
        closeIcon={<CloseIcon />}
        renderLink={(link, props) => (
          <Link to={link.to} {...props}>{link.label}</Link>
        )}
      />
    </nav>
  );
}

Carousel + momentum

<CircularMenu
  links={links}
  openIcon={<HamburgerIcon />}
  closeIcon={<CloseIcon />}
  renderLink={(link, props) => (
    <Link to={link.to} {...props}>{link.label}</Link>
  )}
  carousel
  emphasize="bottom"
  snap
  carryMomentum
  introSpin
  emphasisScale={1.33}
  neutralScale={0.75}
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | links | NavLink[] | required | Array of { to: string; label: string } | | renderLink | (link: NavLink, props: LinkRenderProps) => ReactNode | required | Render function for each menu item. Spread props onto your <Link> or <a>. | | openIcon | ReactNode | required | Icon shown when the menu is closed (hamburger) | | closeIcon | ReactNode | required | Icon shown when the menu is open (X / close) | | theme | 'light' \| 'dark' | OS preference | Override the color theme | | radius | number | 130 | Radius in px of the radial arc | | angle | number \| 'top' \| 'right' \| 'bottom' \| 'left' | 225 | Central focal angle of the arc | | startAngle | number | — | Manual start angle in degrees (overrides angle) | | endAngle | number | — | Manual end angle in degrees (overrides angle) | | staggerMs | number | 50 | Stagger delay in ms between each opening item | | carousel | boolean | false | Enable 360° draggable carousel mode | | emphasize | boolean \| number \| 'top' \| 'right' \| 'bottom' \| 'left' | false | Scale up items as they rotate to this angle | | snap | boolean | false | Smooth-snap the nearest item to the emphasis angle on release | | emphasisScale | number | — | Scale factor for the emphasized item (e.g. 1.33) | | neutralScale | number | — | Scale factor for the opposite-side items for a continuous gradient (e.g. 0.75) | | carryMomentum | boolean | false | Apply angular momentum on drag release (fortune-wheel spin-down) | | introSpin | boolean | false | Play a spin flourish when the menu first opens |

License

MIT