A modern implementation of the classic Hangman word-guessing game built with React, TypeScript, and Vite.
- 🎮 Interactive keyboard-based gameplay
- 🎯 Word hints to help players
- 🎨 Modern and clean user interface
- 🏆 Win/lose state tracking
- 🔄 Easy game restart functionality
- 🎯 Visual hangman drawing that updates with incorrect guesses
- The game randomly selects a word from a predefined list
- Type letters on your keyboard to make guesses
- Correct guesses will reveal the letter in the word
- Incorrect guesses will add parts to the hangman drawing
- You win if you guess all letters in the word
- You lose if you make 6 incorrect guesses
- Use the refresh button to start a new game at any time
- React 19
- TypeScript
- Vite
- CSS3
- Node.js (latest LTS version recommended)
- npm or yarn
- Clone the repository:
git clone https://github.com/Lenonkoech/hangman
cd hangman- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
src/
├── components/ # React components
├── assets/ # Static assets
├── App.tsx # Main application component
├── main.tsx # Application entry point
└── hangman_words.json # Word list with hints
Feel free to submit issues and enhancement requests!
This project is open source and available under the MIT License.