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

interactive-orb-react

v1.0.1

Published

A beautiful, animated interactive orb component for AI assistants

Downloads

159

Readme

Interactive Orb

A beautiful, animated interactive orb component for AI assistants. Powered by procedural particle sphere with real-time state mixing and voice amplitude reactivity.

Features

  • ✨ Procedural particle sphere - 720 particles arranged in a golden ratio pattern
  • 🎨 Multiple states - idle, connecting, listening, thinking, speaking, error, disabled
  • 🎵 Audio reactivity - Responds to voice amplitude for real-time feedback
  • 🌈 Customizable colors - Full control over color gradients
  • 🎯 State mixing - Smooth transitions between different states
  • ♿ Accessibility - Full ARIA support and reduced motion support
  • 📱 Responsive - Works on all screen sizes
  • ⚡ Performance optimized - Uses requestAnimationFrame and visibility detection

Installation

npm install interactive-orb

Usage

import { InteractiveOrb } from 'interactive-orb';
import { useRef } from 'react';

function App() {
  const audioLevelRef = useRef<number>(0);
  
  return (
    <InteractiveOrb
      state="listening"
      size={400}
      colorFrom="#f0abfc"
      colorTo="#818cf8"
      levelRef={audioLevelRef}
      showAura={true}
    />
  );
}

Props

InteractiveOrb

| Prop | Type | Default | Description | |------|------|---------|-------------| | state | 'idle' \| 'connecting' \| 'listening' \| 'thinking' \| 'speaking' \| 'error' \| 'disabled' | 'idle' | Current state of the orb | | size | number | 460 | Size in pixels | | speed | number | 1 | Animation speed multiplier | | colorFrom | string | '#f0abfc' | Start color for gradient | | colorTo | string | '#818cf8' | End color for gradient | | levelRef | RefObject<number> | undefined | Ref to audio level (0-1) for reactivity | | className | string | undefined | Additional CSS classes | | onDoubleClick | () => void | undefined | Double click handler | | showAura | boolean | true | Show the glowing aura effect |

States

  • idle - Default state with gentle breathing animation
  • connecting - Orb forms a ring pattern while connecting
  • listening - Ripple effect when listening to user input
  • thinking - Pulse effect while processing
  • speaking - Flow effect when the assistant is speaking
  • error - Red color with shake animation
  • disabled - Grayed out and reduced opacity

Audio Integration

To make the orb react to audio, provide a level ref:

import { InteractiveOrb } from 'interactive-orb';
import { useRef, useEffect } from 'react';

function App() {
  const audioLevelRef = useRef<number>(0);
  
  // Update audio level from your audio system
  useEffect(() => {
    const updateLevel = (level: number) => {
      audioLevelRef.current = level;
    };
    
    // Connect to your audio analysis system
    // This depends on your audio implementation
  }, []);
  
  return (
    <InteractiveOrb
      state="listening"
      levelRef={audioLevelRef}
    />
  );
}

AI Model Integration

Works with any AI model (OpenAI, Anthropic, Google, etc.):

import { InteractiveOrb } from 'interactive-orb';

function AIAssistant() {
  const [state, setState] = useState('idle');
  const audioLevelRef = useRef<number>(0);
  
  const handleAIPhase = (phase: string) => {
    setState(phase);
  };
  
  return (
    <InteractiveOrb
      state={state}
      levelRef={audioLevelRef}
      size={500}
    />
  );
}

Customization

You can fully customize the appearance:

<InteractiveOrb
  state="speaking"
  size={600}
  speed={1.5}
  colorFrom="#ff6b6b"    // Custom colors
  colorTo="#4ecdc4"
  showAura={false}        // Disable aura
/>

Performance

  • Uses requestAnimationFrame for smooth animations
  • Automatically pauses when not in viewport
  • Respects prefers-reduced-motion preference
  • Efficient particle rendering with canvas

Browser Support

  • Modern browsers with ES2020 support
  • Canvas API support
  • Web Audio API (for audio reactivity)

License

MIT

Contributing

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