Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@bagdock/loyalty-react

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bagdock/loyalty-react

Bagdock Loyalty React SDK — embeddable themed components for referrals, rewards, and points

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source
  ----++                                ----++                    ---+++     
  ---+++                                ---++                     ---++      
 ----+---     -----     ---------  --------++ ------     -----   ----++----- 
 ---------+ --------++----------++--------+++--------+ --------++---++---++++
 ---+++---++ ++++---++---+++---++---+++---++---+++---++---++---++------++++  
----++ ---++--------++---++----++---++ ---++---++ ---+---++     -------++    
----+----+---+++---++---++----++---++----++---++---+++--++ --------+---++   
---------++--------+++--------+++--------++ -------+++ -------++---++----++  
 +++++++++   +++++++++- +++---++   ++++++++    ++++++    ++++++  ++++  ++++  
                     --------+++                                             
                       +++++++                                               

@bagdock/loyalty-react

React components for embedding Bagdock Loyalty — referral widgets, rewards, points, and leaderboards with built-in theming.

npm version License: MIT

Install

npm install @bagdock/loyalty-react @bagdock/loyalty react react-dom

Quick start

import { BagdockLoyaltyProvider, ReferralWidget, PointsDisplay } from '@bagdock/loyalty-react'

function App() {
  return (
    <BagdockLoyaltyProvider embedToken="etk_live_..." memberId="mem_abc123">
      <PointsDisplay />
      <ReferralWidget />
    </BagdockLoyaltyProvider>
  )
}

Components

<BagdockLoyaltyProvider>

Wraps your app to configure the Loyalty client and theming.

PropTypeDescription
apiKeystringAPI key for direct operator use
embedTokenstringEmbed token (preferred for client-side)
platformApiKeystringPlatform API key (pak_...) for embedded use
baseUrlstringAPI base URL override
operatorIdstringOperator ID (required with platformApiKey)
memberIdstringPre-identified member ID
appearanceBagdockAppearanceTheming object
brandNamestringOperator brand name
logoUrlstringOperator logo URL

<ReferralWidget>

Full referral sharing widget with link generation and sharing options.

<ReferralCard>

Individual referral card with status and reward info.

<RewardsDisplay>

Shows available rewards and redemption options.

<PointsDisplay>

Displays the member's current point balance and history.

<LeaderboardWidget>

Referral leaderboard showing top referrers.

Hooks

HookReturnsDescription
useLoyalty()LoyaltyContextValueAccess the Loyalty context (client, theme)

Theming

Customize with a Stripe/Clerk-style appearance prop:

import { BagdockLoyaltyProvider } from '@bagdock/loyalty-react'
import { themes } from '@bagdock/loyalty-react/themes'

<BagdockLoyaltyProvider
  embedToken="etk_live_..."
  appearance={{
    theme: 'dark',
    variables: {
      colorPrimary: '#6366f1',
      borderRadius: '12px',
    },
  }}
>
  {children}
</BagdockLoyaltyProvider>

Preset themes

import { themes } from '@bagdock/loyalty-react/themes'
// themes.default, themes.dark, themes.minimal, etc.

Platform partners

For platforms embedding loyalty on behalf of operators:

<BagdockLoyaltyProvider
  platformApiKey="pak_live_..."
  operatorId="opreg_wisestorage"
  memberId="mem_abc123"
>
  <PointsDisplay />
</BagdockLoyaltyProvider>

License

MIT

Keywords

bagdock

FAQs

Package last updated on 05 Apr 2026

Did you know?

Socket

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.

Install

Related posts