GameKit UI
Drop-in browser games for shadcn.
Minimal, themeable React/TSX games installable with the shadcn CLI — perfect for 404 pages, empty states, loading screens, and landing-page easter eggs.
No provider. No peer deps. No init step. Each game is a single drop-in file that inherits your shadcn theme automatically — light/dark and any preset. Drop one on a 404 and it plays on the first keypress.
✨ Highlights
- 🪶 Minimal — each game is a single file with zero npm dependencies beyond
reactand your existingcnhelper. 2–4 KB minified + gzipped (the raw.tsxis bigger because it inlines its engine and theme hooks), and lazy-loadable so it never weighs down your initial bundle. - 🎨 Themeable — your
--primary/--secondary/--accentdrive the playfield, not just the chrome. Canvas games read the tokens at runtime; DOM games use Tailwind token classes. Change your theme and the games recolor live. - 🚫 Zero assets — no images, audio, or fonts. Every pixel is drawn with CSS or
<canvas>. - ♿ Accessible — keyboard + touch input, visible focus rings,
aria-liveannouncements, andprefers-reduced-motionsupport in every game.
🕹️ The lineup
Base registry URL:
https://gamekitui.com/r/{name}.json
🚀 Usage
That's it — no setup. On a single-game page like this, the game captures keyboard input globally, so it responds the moment a visitor presses a key (no click-to-focus needed).
Bundle size & lazy-loading
The installed .tsx looks big (~15–28 KB) because it inlines its own engine and theme hooks to stay a true single-file drop-in — but that's source, not what ships. Built for production each game is 2–4 KB minified + gzipped.
Because every game is a self-contained module, it's trivially code-split — lazy-load it so it never touches your initial bundle and only downloads when the easter egg actually renders:
Pin the registry (optional)
@gamekitui/<game> installs resolve straight from the
Or add "@gamekitui": "https://gamekitui.com/r/{name}.json" to the registries field of your components.json by hand. You can also install any game by its direct URL: npx shadcn@latest add https://gamekitui.com/r/snake.json.
⚙️ Shared props
Every game accepts a common subset of props:
🗂️ Repository layout
🛠️ Development
Other scripts:
🤝 Contributing
Contributions are welcome! See
Found a bug or have an idea?
⚠️ Disclaimer
GameKit UI is an independent, unaffiliated community project. It is not built, sponsored, or endorsed by the shadcn/ui team. It uses the shadcn registry system. The shadcn- prefix is reserved for official projects, which is why this project is named gamekitui (not shadcn-games).