Skip to Content
Advanced: Direct SDKReact IntegrationBridge

Bridge

Cross the glass bridge by picking the right tile on each row — cash out anytime to lock in your multiplier before you fall.

Import

import { BridgeGameSDK } from '@maktubbet/sdk/bridge' import '@maktubbet/sdk/bridge/styles.css'

Usage

'use client' import { useState } from 'react' import { BridgeGameSDK } from '@maktubbet/sdk/bridge' import '@maktubbet/sdk/bridge/styles.css' export default function BridgePage() { return ( <BridgeGameSDK 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

  • 5 difficulty levels — Easy, Medium, Hard, Expert, Master with different risk/reward
  • Progressive multiplier — payout increases with each successful step across the bridge
  • Cash out anytime — collect winnings at any point during the round
  • Animated glass bridge — SVG grid with character animation and fall effects
  • Autobet — automated consecutive rounds

Props

See Shared PropsBridgeGameSDK accepts the standard BridgeGameSDKProps interface.

PropTypeRequiredDefault
accessTokenstring | null
userGameUser
updateBalance(balance: number) => void
onAuthRequired() => void
currencyGameCurrency{ code: 'USD', prefix: '$', rate: 1 }
languagestring'en'
logoReactNode
onToast(toast: ToastData) => void
themeGameTheme
Last updated on