A beautiful, modern chess game built with React, TypeScript, and Tailwind CSS. Features a complete chess implementation with stunning visuals and smooth animations.
- Full Chess Rules: All standard chess moves including castling, pawn promotion, en passant
- Check & Checkmate Detection: Real-time game state analysis
- Stalemate Recognition: Proper draw conditions
- Move Validation: Legal move highlighting and validation
- Algebraic Notation: Complete move history with standard chess notation
- Beautiful Design: Gradient backgrounds with glass-morphism effects
- Responsive Layout: Optimized for desktop, tablet, and mobile devices
- Smooth Animations: Piece hover effects and move transitions
- Visual Feedback:
- Selected piece highlighting with glow effects
- Possible move indicators (dots for empty squares, corner highlights for captures)
- Check/checkmate status with animated icons
- Game state indicators with color-coded badges
- TypeScript: Fully typed for better development experience
- React Hooks: Modern React patterns with custom hooks
- Tailwind CSS: Utility-first styling with custom gradients and effects
- Accessibility: ARIA labels and keyboard navigation support
- Performance: Optimized rendering and move calculation
- Node.js (version 16 or higher)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd react-tailwind-chess
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173to start playing!
- Start a Game: White moves first
- Select a Piece: Click on any of your pieces to see available moves
- Make a Move: Click on a highlighted square to move your piece
- Special Moves:
- Castling: Select your king and click on the castling square
- Pawn Promotion: Pawns automatically promote to Queen when reaching the end
- Game End: The game detects checkmate, stalemate, and check conditions automatically
src/
├── App.tsx # Main application component
├── types.ts # TypeScript type definitions
├── constants.ts # Game constants and piece Unicode
├── components/
│ ├── BoardComponent.tsx # Chess board grid layout
│ ├── SquareComponent.tsx # Individual square with piece
│ ├── PieceDisplay.tsx # Chess piece rendering
│ └── NotationDisplay.tsx # Move history display
└── services/
└── chessEngine.ts # Chess logic and move validation
- Amber Wood Theme: Warm amber colors for a classic chess board feel
- Gradient Backgrounds: Multiple layered gradients for depth
- Glass Morphism: Backdrop blur effects on UI elements
- Responsive Typography: Scales beautifully across all devices
- Hover Effects: Interactive piece and square animations
- Status Indicators: Color-coded game state with icons
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run type-check- Run TypeScript compiler check
- React 18 - UI framework
- TypeScript - Type safety
- Tailwind CSS - Styling framework
- Vite - Build tool and dev server
- En Passant - Special pawn capture rule
- Game Timer - Chess clocks for timed games
- Move Undo/Redo - Navigate through move history
- PGN Export/Import - Save and load games
- AI Opponent - Computer player with difficulty levels
- Online Multiplayer - Play against friends online
- Game Analysis - Move suggestions and analysis
- Custom Themes - Multiple board and piece themes
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Chess piece Unicode characters from Unicode Standard
- Inspiration from classic chess interfaces
- Tailwind CSS community for styling patterns
Made with ❤️ and ♟️ by [Your Name]
Enjoy playing chess! 🎉
