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

@quantabit/floating-widget-sdk

v1.0.2

Published

QuantaBit Floating Widget SDK - Multi-function floating button with AI assistant, support tickets, and feedback integration

Downloads

459

Readme

@quantabit/floating-widget-sdk

QuantaBit Floating Widget SDK - A premium, dynamic honeycomb-style floating menu designed for smooth plug-and-play SDK integrations.


📦 Installation

npm install @quantabit/floating-widget-sdk
# or
yarn add @quantabit/floating-widget-sdk

🚀 Key Features

  • Adaptive Honeycomb Layout: Seamlessly calculates 2D coordinates for an arbitrary number of SDK features on a hexagonal grid, avoiding hardcoded position limitations.
  • Pluggable Architecture: Easily register/unregister custom actions and widgets at runtime from separate micro-frontend SDKs (e.g. VIP subscriptions, crash-reporting widgets, order status checkers).
  • Decoupled Modals: SDKs can register their own React modal/dialog components. The container orchestrates their visible state automatically.
  • Micro-interactions: Vibrant gradient designs, hovering micro-animations, and full RTL/light/dark mode compatibility.

📚 Quick Start

1. Register the Context Provider

Wrap your application root with FloatingWidgetProvider and place the QuickActionsWidget at the bottom layout.

import React from 'react';
import { FloatingWidgetProvider, QuickActionsWidget } from '@quantabit/floating-widget-sdk';
import '@quantabit/floating-widget-sdk/styles';

function MyApp({ Component, pageProps }) {
  return (
    <FloatingWidgetProvider>
      <div className="app-container">
        <Component {...pageProps} />
      </div>
      
      {/* Renders the honeycomb floating bubble */}
      <QuickActionsWidget position="bottom-right" theme="dark" language="en" />
    </FloatingWidgetProvider>
  );
}

export default MyApp;

🔌 Registering Custom SDKs

You can dynamically insert widgets using the Global JS Registry or the React Context hook.

Approach A: Global JS Registry (Best for independent JS bundles)

import { floatingWidgetRegistry } from '@quantabit/floating-widget-sdk';
import MyCustomModal from '@quantabit/my-custom-sdk/components/Modal';

// Register widget dynamically
floatingWidgetRegistry.register('my-custom-feature', {
  icon: '🚀',
  color: '#2563eb',
  title: {
    en: 'Launch Console',
    zh: '运行控制台'
  },
  order: 15, // Display order weight
  component: MyCustomModal, // Custom React component
  enabled: true
});

To remove the module dynamically:

floatingWidgetRegistry.unregister('my-custom-feature');

Approach B: React Hook Integration (Best for component-bound lifetimes)

import React, { useEffect } from 'react';
import { useFloatingWidgetContext } from '@quantabit/floating-widget-sdk';

function LiveSupport() {
  const { registerPlugin, unregisterPlugin } = useFloatingWidgetContext();

  useEffect(() => {
    registerPlugin('live-chat', {
      icon: '💬',
      color: '#10b981',
      title: 'Live Chat',
      onClick: () => {
        console.log('Initiating live chat session...');
      }
    });

    return () => unregisterPlugin('live-chat');
  }, [registerPlugin, unregisterPlugin]);

  return <section>Live Chat Hub</section>;
}

🛠️ API Reference

Data Structures: Feature

interface Feature {
  key: string;               // Unique feature identifier
  icon: string | ReactNode;  // Bubble icon (emoji or React node)
  color: string;             // Theme color background
  enabled?: boolean;         // Active state (default true)
  order?: number;            // Sorting index (default 100)
  title?: string | Record<string, string>; // Multi-lingual labels
  onClick?: (feature: Feature) => void;     // Direct trigger handler
  component?: ComponentType<any>;           // Modal/Panel component to show on click
}

🎨 Themes & Custom CSS Variables

Override layout variables inside your global CSS stylesheet:

:root {
  --fw-primary: #7c3aed;         /* Primary bubble gradient base */
  --fw-bg: #ffffff;              /* Light mode card background */
  --fw-bg-dark: #1f2937;         /* Dark mode card background */
  --fw-btn-size: 56px;           /* Main floating action button size */
  --fw-feature-size: 48px;       /* Individual feature button size */
}

📄 License

MIT License


🌐 Brand & Links