A fun and interactive Hangman word-guessing game built using React, TypeScript, and Vite ๐ฏ
Guess the hidden word before the hangman is fully drawn!
- Live Demo: https://hangman-typescript-iota.vercel.app/
- GitHub Repository: samirzjadhav/hangman-typescript
- โ๏ธ Built with React + TypeScript + Vite
- ๐จ Clean UI with CSS Modules
- ๐งฉ Random word generator from
wordList.json - ๐น On-screen keyboard + real keyboard support
- ๐ Lose after 6 incorrect guesses
- ๐ Press Enter to restart instantly
- ๐ฑ Fully responsive design
- Try to guess the word by clicking or typing letters.
- Every wrong guess adds a piece to the hangman.
- You have 6 chances before the game is over!
- Press Enter to play again.
## โ๏ธ Installation
```bash
# Clone the repo
git clone https://github.com/your-username/hangman.git
cd hangman
# Install dependencies
npm install
# Run the app
npm run dev
```Then open ๐ http://localhost:5173
hangman/
โโโ src/
โ โโโ components/
โ โ โโโ HangmanDrawing.tsx
โ โ โโโ HangmanWord.tsx
โ โ โโโ Keyboard.tsx
โ โโโ wordList.json
โ โโโ App.tsx
โ โโโ main.tsx
โ โโโ App.css
โโโ public/
โโโ tsconfig.app.json
โโโ package.json
โโโ vite.config.ts
wordList.json
["apple", "banana", "grape", "cherry", "orange", "mango"]| Technology | Description |
|---|---|
| โ๏ธ React | UI component library |
| ๐ง TypeScript | Type-safe JavaScript |
| โก Vite | Fast build tool and dev server |
| ๐จ CSS Modules | Scoped component styling |
| ๐ JSON | For storing word lists |
- ๐ Add multiple word categories (Animals, Movies, Countries)
- ๐ฏ Add difficulty levels (Easy / Medium / Hard)
- ๐ Add sound effects and score tracking
- ๐ซ Animate hangman drawing step-by-step
- ๐ง Add hints system
Contributions are welcome!
- ๐ด Fork the repo
- ๐ฟ Create a new branch (
feature/amazing-feature) - ๐ฌ Commit your changes
- ๐ Open a Pull Request
This project is licensed under the MIT License. You are free to use, modify, and distribute it.
๐ Samir Jadhaw ๐ป Aspiring Front-End Engineer passionate about building delightful web experiences.
๐ Portfolio ๐ผ LinkedIn ๐ GitHub
โญ If you like this project, donโt forget to star the repo and share it!