
Product
Introducing Socket MCP for Claude Desktop
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
@bluvo/widget-vanjs
Advanced tools
Bluvo widget implemented with VanJS for embedding in vanilla JavaScript applications
A lightweight, fast implementation of the Bluvo widget using VanJS for vanilla JavaScript applications. This library provides a simple way to embed crypto exchange integration in your web application.
npm install @bluvo/widget-vanjs
Or with yarn:
yarn add @bluvo/widget-vanjs
Or with pnpm:
pnpm add @bluvo/widget-vanjs
import { initBluvoWidget } from '@bluvo/widget-vanjs';
// Initialize the widget
const widget = initBluvoWidget({
container: '#widget-container',
auth: {
projectId: 'your-project-id',
orgId: 'your-org-id'
},
mode: 'connect',
theme: {
dark: true,
accentColor: '#3B82F6'
}
});
// To destroy the widget when needed
// widget.destroy();
<!-- Include the UMD build in your HTML -->
<script src="https://unpkg.com/@bluvo/widget-vanjs/dist/bluvo-widget.umd.js"></script>
<script>
// The widget is available as the global BluvoWidget object
const widget = BluvoWidget.initBluvoWidget({
container: '#widget-container',
auth: {
projectId: 'your-project-id',
orgId: 'your-org-id'
},
mode: 'connect',
theme: {
dark: true,
accentColor: '#3B82F6'
}
});
// To destroy the widget when needed
// widget.destroy();
</script>
Here's a complete example showing how to embed the widget in a webpage:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bluvo Widget Example</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
background: #f5f5f5;
}
.container {
max-width: 800px;
width: 100%;
}
.heading {
text-align: center;
margin-bottom: 20px;
}
#widget-container {
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div class="container">
<h1 class="heading">Bluvo Widget Demo</h1>
<div id="widget-container"></div>
</div>
<script type="module">
import { initBluvoWidget } from 'https://unpkg.com/@bluvo/widget-vanjs/dist/bluvo-widget.es.js';
// Initialize widget with your configuration
const widget = initBluvoWidget({
container: '#widget-container',
auth: {
projectId: 'your-project-id',
orgId: 'your-org-id'
},
mode: 'connect',
theme: {
dark: true,
accentColor: '#3B82F6'
}
});
</script>
</body>
</html>
The widget accepts various configuration options:
interface BluvoWidgetConfig {
// Required
container: string | HTMLElement;
// Authentication
auth?: {
projectId: string;
orgId: string;
};
projectId?: string; // Legacy option
orgId?: string; // Legacy option
// Core settings
mode?: 'connect' | 'transact'; // Default: 'connect'
exchanges?: string[]; // Default: ['binance', 'coinbase', 'kraken']
width?: string | number; // Default: 360
// Visual customization
theme?: {
dark?: boolean; // Default: true
accentColor?: string; // Default: '#3B82F6'
secondaryColor?: string;
// ... other theme options
};
// Token storage options
storage?: 'localStorage' | 'sessionStorage' | 'none'; // Default: 'localStorage'
// Debug mode
debug?: boolean; // Default: false
// Mode-specific configurations
connect?: {
showSearch?: boolean;
showBranding?: boolean;
showSuccessDetails?: boolean;
exchangeList?: {
logoSize?: number;
};
onSuccess?: (walletId: string) => void;
onComplete?: (walletId: string) => void;
};
transaction?: {
defaultCoin?: string;
coins?: string[];
showSuccessDetails?: boolean;
display?: {
address?: 'input' | 'label' | 'none';
tag?: 'input' | 'label' | 'none';
amount?: 'input' | 'label' | 'none';
};
prefill?: {
address?: Record<string, string>;
tag?: Record<string, string>;
amount?: Record<string, number>;
};
onSuccess?: (tx: any) => void;
onComplete?: (tx: any) => void;
};
}
The widget includes all necessary styling. The base font is inherited from your application, but you can override styles if needed:
.bluvo-widget, .bluvo-widget * {
font-family: your-custom-font, sans-serif;
}
You can also directly import the Widget component for more advanced use cases:
import { Widget } from '@bluvo/widget-vanjs';
import van from 'vanjs-core';
// Create a widget manually
const widgetElement = Widget({
mode: 'connect',
// ... other options
});
// Mount it yourself
van.add(document.getElementById('container'), widgetElement);
The widget is built using VanJS, a minimalist reactive UI framework. The main components include:
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview
This package uses GitHub Actions for continuous integration and deployment. The workflow is organized into two separate jobs:
@bluvo/connect
package (dependency)@bluvo/connect
The workflow triggers on:
Since this package is part of a monorepo and depends on the internal @bluvo/connect
package, the CI/CD workflow:
@bluvo/connect
is already published to npmworkspace:*
)The workflow file is located at .github/workflows/publish-widget-vanjs.yml
.
MIT
FAQs
Bluvo widget implemented with VanJS for embedding in vanilla JavaScript applications
The npm package @bluvo/widget-vanjs receives a total of 4 weekly downloads. As such, @bluvo/widget-vanjs popularity was classified as not popular.
We found that @bluvo/widget-vanjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.