Spark
Light up matching bulbs to win — match 5 of a kind for the 50x jackpot!
Import
import { SparkGameSDK } from '@maktubbet/sdk/spark'
import '@maktubbet/sdk/spark/styles.css'You can also import from the root package:
import { SparkGameSDK } from '@maktubbet/sdk'Usage
'use client'
import { useState } from 'react'
import { SparkGameSDK } from '@maktubbet/sdk/spark'
import '@maktubbet/sdk/spark/styles.css'
export default function SparkPage() {
return (
<SparkGameSDK
accessToken="user-jwt-token"
user={{ betCount: 0, isAuthenticated: true }}
updateBalance={(newBalance) => console.log(newBalance)}
onAuthRequired={() => console.log('Auth required')}
currency={{ code: 'USD', prefix: '$', rate: 1 }}
language="en"
logo={<span>MY LOGO</span>}
onToast={(t) => console.log('Toast:', t.title)}
theme={{
backgroundDark: '#0D1117',
backgroundDarkLight: '#161B22',
inputBackground: '#0D1117',
actionButtonColor: '#1C2333',
buttonColor: '#FFFFFF',
}}
/>
)
}Demo Mode
Demo mode is automatically enabled when a user places a bet with a $0 amount. To run the game entirely client-side without a backend session, pass isDemo — see Demo Mode.
Features
- Light bulb matching — 5 bulbs revealed one by one, matching colors win
- 7 combinations — from Zero Match (0x) to Five of a Kind (50x)
- Lit/unlit bulbs — matching bulbs light up yellow with glow effects
- Paytable — interactive paytable showing all combinations with profit and chance
- Pedestal glow — matching bulbs illuminate their pedestals
- Autobet — automated consecutive bets
- Advanced strategies — conditional betting with custom rules
- Theme-aware — all UI elements adapt to the dark background theme
Props
See Shared Props — SparkGameSDK accepts the standard SparkGameSDKProps interface.
| Prop | Type | Required | Default |
|---|---|---|---|
accessToken | string | null | ✅ | — |
user | GameUser | ✅ | — |
updateBalance | (balance: number) => void | ✅ | — |
onAuthRequired | () => void | ✅ | — |
currency | GameCurrency | — | { code: 'USD', prefix: '$', rate: 1 } |
language | string | — | 'en' |
logo | ReactNode | — | — |
onToast | (toast: ToastData) => void | — | — |
theme | GameTheme | — | — |
Last updated on