404-particle-pro is a canvas-powered, generative-art 404 error page that transforms the classic “Page Not Found” into an immersive experience.
Instead of static text, the 404 is built from hundreds of particles that:
- 🐝 React to mouse & touch movement
- 🧲 Disintegrate on interaction
- 🔁 Smoothly reassemble into the original shape
- ⚡ Run entirely on Vanilla JavaScript
Designed for developers who care about details, motion, and polish.
- Text rendered via
<canvas> - Pixel-scanned glyph generation
- Each pixel becomes an independent particle
- Base-position locking preserves glyph accuracy
- Mouse & touch repulsion
- Density-based force calculation
- Maximum offset clamping (prevents shape distortion)
- Smooth easing back to origin
- Device Pixel Ratio (DPR) aware
- Retina-sharp visuals
- Scales dynamically with viewport size
- Debounced resize recalculation
-
Floating system-style message
-
Accessible reassemble button
-
Keyboard support:
Enter/Space→ ReassembleEscape→ Exit error state
- No libraries
- No frameworks
- No assets
- Single HTML file
git clone https://github.com/ViratiAkiraNandhanReddy/404-particle-pro.gitRename the file:
index.html → 404.html
Push it to the root of your GitHub Pages repository.
GitHub Pages automatically serves 404.html for all invalid routes.
ctx.fillText('404', adjustX, adjustY);Replace with any short word (e.g. "ERROR", "LOST").
const densityCSS = 7;Lower = fewer particles, higher = denser glyph.
const mouse = { radius: 120 };Controls how far particles react to input.
:root {
--bg: #0b0b0b;
--cyan: #00f0ff;
}- Canvas marked
aria-hidden="true" - Semantic button element
- ARIA labels for screen readers
- Keyboard-only navigation support
- Focus-visible outlines
- Chrome
- Edge
- Firefox
- Safari
- Mobile browsers
(Requires Canvas + ES6 support)
Contributions are welcome:
- Fork the repository
- Create a new branch
- Commit your changes
- Open a Pull Request
If you like this project, consider giving it a star ⭐ — it helps a lot.
© 2025 ViratiAkiraNandhanReddy. This project is licensed under the MIT License.
Developed by ViratiAkiraNandhanReddy & Modified by AdnanSlametWibowo
💤 - PASSIVE MAINTENANCE : Mean the project is no longer actively developed ( NO New Features And Regular Updates ), but the maintainer will respond only when an issue or PR is raised. Feel free to fork and continue development!

