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

@denisbitter/bitter-button-menu

v1.0.0

Published

A beautiful radial/orbit menu button component with smooth animations

Downloads

16

Readme

@denisbitter/bitter-button-menu

A beautiful, customizable radial/orbit menu button component for React applications with smooth animations powered by Framer Motion.

Version License

Features

  • 🎨 Highly Customizable: Full control over colors, sizes, animations, and behavior
  • 🌀 Radial Menu Layout: Items arranged in a circle around the main button
  • Smooth Animations: Beautiful spring animations powered by Framer Motion
  • 📱 Responsive: Works on all screen sizes
  • 🎯 TypeScript Support: Full type definitions included
  • 🔧 Easy Integration: Works seamlessly with React Router
  • 🎭 Submenu Support: Nested menu capability
  • 💾 Smart Persistence: Tooltip state saved in localStorage
  • 🎪 Scroll Behavior: Button follows scroll with configurable behavior

Installation

npm install @denisbitter/bitter-button-menu

or

yarn add @denisbitter/bitter-button-menu

Basic Usage

import React from 'react';
import BitterButtonWithMenu from '@denisbitter/bitter-button-menu';

function App() {
  const mainMenuItems = [
    {
      id: "home",
      label: "Home",
      angle: 0,
      route: "/",
    },
    {
      id: "about",
      label: "About",
      angle: -90,
      route: "/about",
    },
    {
      id: "contact",
      label: "Contact",
      angle: -180,
      route: "/contact",
    }
  ];

  return (
    <BitterButtonWithMenu
      logoSrc="/path/to/your/logo.png"
      logoAlt="Menu"
      mainMenuItems={mainMenuItems}
    />
  );
}

export default App;

Advanced Usage

With Submenus

import React from 'react';
import BitterButtonWithMenu from '@denisbitter/bitter-button-menu';

function App() {
  const mainMenuItems = [
    {
      id: "home",
      label: "Home",
      angle: 0,
      route: "/",
    },
    {
      id: "about",
      label: "About",
      angle: -90,
      action: "openSubmenu",
      submenu: "about",
      hasSubmenu: true,
    }
  ];

  const submenuItems = {
    about: [
      {
        id: "back",
        label: "Back",
        angle: 0,
        action: "closeSubmenu",
        isBack: true,
      },
      {
        id: "team",
        label: "Team",
        angle: -60,
        route: "/about/team",
      },
      {
        id: "history",
        label: "History",
        angle: -120,
        route: "/about/history",
      }
    ]
  };

  return (
    <BitterButtonWithMenu
      logoSrc="/path/to/your/logo.png"
      mainMenuItems={mainMenuItems}
      submenuItems={submenuItems}
    />
  );
}

With Custom Configuration

import React from 'react';
import BitterButtonWithMenu from '@denisbitter/bitter-button-menu';

function App() {
  const customConfig = {
    visual: {
      radius: 120,
      button: {
        width: 70,
        height: 70,
      },
      colors: {
        backdrop: "rgba(0, 0, 0, 0.3)",
      },
    },
    animation: {
      menuItem: {
        stiffness: 300,
        damping: 25,
        staggerDelay: 0.08,
      },
    },
  };

  const mainMenuItems = [
    // ... your menu items
  ];

  return (
    <BitterButtonWithMenu
      logoSrc="/path/to/your/logo.png"
      mainMenuItems={mainMenuItems}
      config={customConfig}
      accentColor="#FF6B35"
      tooltipText="Open Menu"
      tooltipDuration={5000}
    />
  );
}

With Dynamic Name Context

import React from 'react';
import BitterButtonWithMenu from '@denisbitter/bitter-button-menu';

function App() {
  const mainMenuItems = [
    {
      id: "home",
      label: "Hello {name}",
      angle: 0,
      route: "/",
      dynamic: true,
    }
  ];

  const nameContext = {
    name: "John"
  };

  return (
    <BitterButtonWithMenu
      logoSrc="/path/to/your/logo.png"
      mainMenuItems={mainMenuItems}
      nameContext={nameContext}
    />
  );
}

Props

BitterButtonWithMenu

| Prop | Type | Default | Description | |------|------|---------|-------------| | logoSrc | string | - | URL/path to the logo image | | logoAlt | string | "Menu Button" | Alt text for the logo | | mainMenuItems | Array | [] | Array of main menu item configurations | | submenuItems | Object | {} | Object with submenu configurations (key: submenu id) | | onMenuClick | Function | - | Callback when menu is toggled | | onOverlayOpen | Function | - | Callback when overlay action is triggered | | config | Object | default config | Custom configuration object | | nameContext | Object | - | Context for dynamic name replacement | | tooltipText | string | "Menü öffnen" | Text to show in tooltip | | tooltipDuration | number | 6000 | Duration tooltip stays visible (ms) | | accentColor | string | "#AC8E66" | Accent color for highlights |

Menu Item Configuration

{
  id: string;              // Unique identifier
  label: string;           // Display text
  angle: number;           // Position angle (-180 to 180)
  route?: string;          // React Router route
  action?: string;         // Action type: 'openOverlay', 'openSubmenu', 'closeSubmenu'
  submenu?: string;        // Submenu ID (if action is 'openSubmenu')
  hasSubmenu?: boolean;    // Indicates item has submenu
  dynamic?: boolean;       // Enable dynamic label replacement
  isMainMenu?: boolean;    // Style as main menu item
  isBack?: boolean;        // Style as back button
  onClick?: Function;      // Custom click handler
}

Configuration Object

{
  visual: {
    radius: number;                    // Radius of menu circle
    menuOffset: number;                // Offset when menu opens
    colors: {
      primary: string;
      primaryDark: string;
      background: string;
      backgroundDark: string;
      text: string;
      border: string;
      borderHighlight: string;
      backdrop: string;
    };
    button: {
      width: number;
      height: number;
      fontSize: string;
      fontFamily: string;
    };
    backdrop: {
      blur: string;
      opacity: number;
    };
  };
  animation: {
    menuItem: {
      stiffness: number;
      damping: number;
      staggerDelay: number;
    };
    backdrop: {
      duration: number;
    };
  };
}

Hooks

useOrbitMenuConfig

Access and customize the menu configuration at runtime.

import { useOrbitMenuConfig } from '@denisbitter/bitter-button-menu';

function CustomMenuControls() {
  const { config, updateConfig, applyPreset, resetConfig } = useOrbitMenuConfig();

  return (
    <div>
      <button onClick={() => updateConfig('visual.radius', 150)}>
        Increase Radius
      </button>
      <button onClick={() => applyPreset('compact')}>
        Apply Compact Preset
      </button>
      <button onClick={resetConfig}>
        Reset to Default
      </button>
    </div>
  );
}

Presets

Available configuration presets:

  • compact - Smaller radius and faster animations
  • spacious - Larger radius and slower animations
  • fast - Quick, snappy animations
  • smooth - Slower, smoother animations

Styling

The component uses Tailwind CSS classes. Make sure you have Tailwind CSS configured in your project, or the styles won't work properly.

Tailwind Configuration

Add to your tailwind.config.js:

module.exports = {
  content: [
    "./src/**/*.{js,jsx,ts,tsx}",
    "./node_modules/@denisbitter/bitter-button-menu/dist/**/*.js"
  ],
  // ... rest of your config
}

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Requirements

  • React 18+
  • React Router DOM 6+
  • Framer Motion 11+

License

MIT © Denis Bitter

Author

Denis Bitter

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.