breakout404

Turn your 404 page into a Breakout-style game. Drop in a few lines of code and let users smash the error away.

Try the 404 page
$ npm install @3rg0n/breakout404-core
404.html
import { Breakout404Game } from '@3rg0n/breakout404-core';

// That's it. One line to launch the game.
new Breakout404Game('#game', {
  difficulty: 'medium',
  redirectUrl: '/',
  onComplete: () => console.log('404 destroyed!'),
});

Themes

Default, neon, ocean, or bring your own colors. Every element is customizable.

Difficulty

Easy, medium, hard. Ball speed, paddle size, and lives are all configurable.

Framework Support

Vanilla JS, React, and Vue wrappers. Works anywhere you can mount a div.

Callbacks

Hooks for block destroyed, game complete, and redirect. Wire it into your analytics.