Package Exports
- @brij-fi/widget-sdk
Readme
BRIJ Widget SDK
Embed crypto on/off-ramp functionality into your application with a few lines of code.
Quick Start
1. Add the SDK
<script src="https://unpkg.com/@brij-fi/widget-sdk/dist/index.umd.js"></script>Or install via npm:
npm install @brij-fi/widget-sdk2. Initialize the Widget
<div id="brij-widget"></div>
<script>
const {BrijSDK, BrijAction} = window.BrijSDK;
const sdk = BrijSDK.init('#brij-widget', {
apiKey: 'your-api-key',
chains: ['SOLANA'], // Optional, remove to support all chains
mode: ['ONRAMP'], // or 'OFFRAMP', or remove to support both modes
});
</script>3. Customize Theme (Optional)
const sdk = BrijSDK.init('#brij-widget', {
apiKey: 'your-api-key',
theme: {
mode: 'dark', // 'light' (default) or 'dark'
logoUrl: 'https://your-site.com/logo.png',
// Backgrounds
contentBg: '0F0F23', // Content background
pageBg: '2D2B2C', // Page background
inputFieldBg: '2D2B2C', // Input field background
// Text
text: 'FFFFFF', // Primary text color
footerText: '6B6B6B', // Footer text color
// Brand
primaryBrand: '6366F1', // Brand accent color
// Primary CTA buttons
primaryCtaBgActive: '4F46E5', // Active CTA background
primaryCtaBgInactive: '999999', // Inactive CTA background
primaryCtaTextActive: 'FFFFFF', // Active CTA text
primaryCtaTextInactive: 'CACACA',// Inactive CTA text
// Secondary CTA buttons
secondaryCtaBg: '2D2B2C', // Secondary CTA background
secondaryCtaText: 'FFFFFF', // Secondary CTA text
// Menu
menuButton: 'FFFFFF', // Menu button color
}
});Documentation
Full documentation: docs.brij.fi