Baccarat
Classic card game — bet on Player, Banker, or Tie and watch the cards reveal.
Import
import { BaccaratGameSDK } from '@maktubbet/sdk/baccarat'
import '@maktubbet/sdk/baccarat/styles.css'Usage
'use client'
import { useState } from 'react'
import { BaccaratGameSDK } from '@maktubbet/sdk/baccarat'
import '@maktubbet/sdk/baccarat/styles.css'
export default function BaccaratPage() {
return (
<BaccaratGameSDK
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>}
cardLogo={<img src="/card-logo.svg" alt="Card logo" />}
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
- Animated card dealing — realistic card deal and flip animations
- Player, Banker, Tie — bet on any outcome
- Third card rules — automatic third card draw following standard baccarat rules
- Bet history — track recent results
Props
See Shared Props — BaccaratGameSDK accepts the standard BaccaratGameSDKProps 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 | — | — |
cardLogo | ReactNode | — | — |
onToast | (toast: ToastData) => void | — | — |
theme | GameTheme | — | — |
logorenders in the game’s bottom bar and on the back of the cards. PasscardLogoto use a different logo on the card backs only — it overrideslogothere and falls back tologowhen omitted.
Last updated on