Thanks to visit codestin.com
Credit goes to github.com

Skip to content

๐ŸŽฎ A fun and interactive Hangman word-guessing game built using React, TypeScript, and Vite. Guess the word before the hangman is fully drawn โ€” features on-screen and keyboard input, responsive design, and instant restart!

Notifications You must be signed in to change notification settings

samirzjadhav/hangman-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•น๏ธ Hangman Game โ€” React + TypeScript + Vite

Vite React TypeScript License Status

A fun and interactive Hangman word-guessing game built using React, TypeScript, and Vite ๐ŸŽฏ
Guess the hidden word before the hangman is fully drawn!


๐ŸŽฎ Demo


โœจ Features

  • โš›๏ธ 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

๐Ÿง  How to Play

  1. Try to guess the word by clicking or typing letters.
  2. Every wrong guess adds a piece to the hangman.
  3. You have 6 chances before the game is over!
  4. 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


๐Ÿ—‚๏ธ Project Structure

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

๐Ÿงฉ Example Word List

wordList.json

["apple", "banana", "grape", "cherry", "orange", "mango"]

๐Ÿš€ Technologies Used

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

๐Ÿ’ก Future Improvements

  • ๐ŸŒ 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

๐Ÿค Contributing

Contributions are welcome!

  1. ๐Ÿด Fork the repo
  2. ๐ŸŒฟ Create a new branch (feature/amazing-feature)
  3. ๐Ÿ’ฌ Commit your changes
  4. ๐Ÿš€ Open a Pull Request

๐Ÿ“œ License

This project is licensed under the MIT License. You are free to use, modify, and distribute it.


๐Ÿ‘จโ€๐Ÿ’ป Author

๐Ÿ‘‹ 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!


About

๐ŸŽฎ A fun and interactive Hangman word-guessing game built using React, TypeScript, and Vite. Guess the word before the hangman is fully drawn โ€” features on-screen and keyboard input, responsive design, and instant restart!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published