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

@bluvo/widget-react

v0.0.15

Published

React wrapper for Bluvo widget

Readme

Bluvo Widget for React

A React wrapper for the Bluvo widget, providing seamless integration with React and Next.js applications.

Features

  • Simple React component for the Bluvo widget
  • TypeScript support with full type definitions
  • Hooks for widget token management
  • Clean React patterns for props, callbacks, and lifecycle management

Installation

npm install @bluvo/widget-react

Or with yarn:

yarn add @bluvo/widget-react

Or with pnpm:

pnpm add @bluvo/widget-react

Basic Usage

import { BluvoWidget } from '@bluvo/widget-react';
import 'react';

function App() {
  return (
    <div className="app">
      <h1>Bluvo Widget Demo</h1>
      
      <BluvoWidget
        auth={{
          projectId: 'your-project-id',
          orgId: 'your-org-id'
        }}
        mode="connect"
        width={400}
        theme={{
          dark: true,
          accentColor: '#3B82F6'
        }}
        onMount={() => console.log('Widget mounted')}
        onDestroy={() => console.log('Widget destroyed')}
      />
    </div>
  );
}

export default App;

Next.js Usage

For Next.js apps, you'll want to use dynamic imports to avoid SSR issues with browser-only code:

'use client';

import dynamic from 'next/dynamic';
import { useState } from 'react';

// Dynamically import the widget to avoid SSR issues
const BluvoWidget = dynamic(
  () => import('@bluvo/widget-react').then(mod => mod.BluvoWidget),
  { ssr: false }
);

export default function DashboardPage() {
  return (
    <div className="dashboard">
      <h1>Dashboard</h1>
      
      <div className="widget-container">
        <BluvoWidget
          auth={{
            projectId: 'your-project-id',
            orgId: 'your-org-id'
          }}
          mode="connect"
          theme={{
            dark: true,
            accentColor: '#3B82F6'
          }}
        />
      </div>
    </div>
  );
}

Using the Hook API

You can use the useBluvoWidget hook to manage tokens outside the widget:

import { BluvoWidget, useBluvoWidget } from '@bluvo/widget-react';

function Dashboard() {
  const { hasTokens, clearTokens } = useBluvoWidget();
  
  // Check if the user is connected to Binance
  const isBinanceConnected = hasTokens('binance');
  
  // Function to disconnect from an exchange
  const disconnectExchange = (exchangeId) => {
    clearTokens(exchangeId);
    alert(`Disconnected from ${exchangeId}`);
  };
  
  return (
    <div>
      <h1>Dashboard</h1>
      
      {isBinanceConnected && (
        <button onClick={() => disconnectExchange('binance')}>
          Disconnect Binance
        </button>
      )}
      
      <BluvoWidget
        auth={{
          projectId: 'your-project-id',
          orgId: 'your-org-id'
        }}
        mode="connect"
      />
    </div>
  );
}

Configuration Options

The BluvoWidget component accepts all the same configuration options as the underlying VanJS widget, plus some React-specific props:

interface BluvoWidgetProps {
  // React-specific props
  className?: string;
  style?: React.CSSProperties;
  onMount?: () => void;
  onDestroy?: () => void;
  
  // Auth configuration
  auth?: {
    projectId: string;
    orgId: string;
  };
  
  // Widget mode
  mode?: 'connect' | 'transact';
  
  // Available exchanges
  exchanges?: string[];
  
  // Widget dimensions
  width?: string | number;
  
  // Theme options
  theme?: {
    dark?: boolean;
    accentColor?: string;
    secondaryColor?: string;
  };
  
  // And many more options...
}

For full configuration options, refer to the TypeScript definitions or the original widget documentation.

Development

# Install dependencies
pnpm install

# Start development in watch mode
pnpm dev

# Build for production
pnpm build

# Run tests
pnpm test

# Lint code
pnpm lint

# Type check
pnpm check-types

License

MIT