Doors
Choose a door to escape each room — pick the safe one to advance and multiply your bet. Behind the wrong door lurks a monster.
Import
import { DoorsGameSDK } from '@maktubbet/sdk/doors'
import '@maktubbet/sdk/doors/styles.css'Usage
'use client'
import { useState } from 'react'
import { DoorsGameSDK } from '@maktubbet/sdk/doors'
import '@maktubbet/sdk/doors/styles.css'
export default function DoorsPage() {
return (
<DoorsGameSDK
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
- Room-based progression — pick a safe door in each room to advance
- Progressive multiplier — payout increases with every room escaped
- Cash out — collect winnings at any point during the round
- Configurable difficulty — choose from different difficulty levels with 2, 3, or 4 doors
Props
See Shared Props — DoorsGameSDK accepts the standard DoorsGameSDKProps 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