A typing speed game built with React and TypeScript. Match the passage with live feedback, a precise timer, and a WPM score when you finish.
Play it live: https://type-racer-game.vercel.app (hosted on Vercel.)
- Modern UI — Dark theme, glass-style card, DM Sans + JetBrains Mono, and subtle accent glow aligned with the in-app look.
- Live character feedback — Correct, incorrect, and “next character” highlighting as you type.
- Accurate timing — Centisecond timer updates while the round is active.
- WPM — Words per minute is shown when you complete a run (based on word count and elapsed time).
- Countdown — Five-second countdown before the input unlocks so you can settle in.
- Auto-finish — When your input exactly matches the full passage, the run ends immediately (no Enter key).
- Multiple prompts — Built-in passages; use New prompt to swap to another random text and reset the round state.
- Race again — After a finished run, start another attempt on the same passage (or pick a new prompt first).
npm install
npm run devOther scripts:
npm run build # Typecheck + production bundle
npm run preview # Serve the production build locally
npm run lint # ESLint- Click Start race and wait for the countdown.
- Type the passage in the input field. Fix mistakes as you go; the display shows per-character status.
- Finish by typing the last character correctly — the timer stops as soon as the full text matches.
- Check your time and WPM, then Race again or New prompt for a fresh passage.
src/App.tsx— Game logic, prompts, timers, and UI structure.src/styles/App.css— Component and theme styles.src/styles/index.css— Global base styles and font import.public/favicon.svg— Tab icon (passage lines + caret).
- React 19
- TypeScript
- Vite 7
- ESLint (flat config)