A sleek and interactive Blackjack game built with React, featuring a modern UI design with animations and comprehensive game history tracking.
- Interactive betting system with chip selection
- Split hands functionality
- Double down option
- Fold/Surrender capability
- Dealer AI following standard casino rules (hit on 16, stand on 17)
- Responsive design that works on mobile and desktop
- Smooth animations for card dealing and chip placement
- Real-time balance updates
- Clear game status messages
- Dark/Light theme toggle
- Comprehensive game history tracking
- Animated side panel with game statistics
- Results grouped by date
- Win/Loss/Tie statistics
- Profit/Loss tracking per game
- Local storage persistence for game state
- Responsive mobile-first design
- Framer Motion animations
- TypeScript for type safety
- Modern React patterns and hooks
- Frontend Framework: React
- Styling: Tailwind CSS + shadcn/ui
- Animations: Framer Motion
- State Management: React Hooks
- Type Safety: TypeScript
- Storage: Local Storage
- Build Tool: Vite
- Objective: Beat the dealer's hand without going over 21
- Card Values:
- Number cards (2-10): Face value
- Face cards (J, Q, K): 10
- Ace: 1 or 11
- Betting:
- Minimum bet: $5
- Maximum bet: $500
- Chips available: $5, $25, $100, $500
- Actions:
- Hit: Take another card
- Stand: Keep current hand
- Split: Split paired cards into two hands
- Fold: Surrender hand and receive half bet back
The main game interface showing the dealer's hand, player's hand, and betting controls.
Interactive chip selection with animations and current bet display.
Detailed game history panel showing past games and statistics.
- Start Game: Enter your name to begin
- Place Bet: Select chips to place your bet
- Play Hand: Choose from available actions (Hit, Stand, Split, Fold)
- View Results: See if you won, lost, or tied
- Track History: View your game history in the side panel
blackjack.tsx: Main game logic and UIScoreBoard.tsx: Game history trackingBettingControls.tsx: Betting interfaceHand.tsx: Card display logic
- Clone the repository
- Install dependencies:
npm install - Build prohect:
npm run build - Start the development server:
npm run dev - Open
http://localhost:3000in your browser