BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/8bitcn/not-found-brick-breaker

8-bit Brick Breaker 404

8bitcn/not-found-brick-breaker
FreeBlock

A playable brick-breaker 404 page with keyboard, pointer, and touch controls.

Install it

npx shadcn@latest add https://www.8bitcn.com/r/not-found-brick-breaker.json

Source

components/ui/8bit/blocks/not-found-brick-breaker.tsxwww.8bitcn.com/r/not-found-brick-breaker.json · first 6 KB
1"use client";
2
3import Link from "next/link";
4import {
5 type KeyboardEvent,
6 type PointerEvent as ReactPointerEvent,
7 useCallback,
8 useEffect,
9 useId,
10 useRef,
11 useState,
12} from "react";
13
14import { Badge } from "@/components/ui/8bit/badge";
15import { Button } from "@/components/ui/8bit/button";
16import {
17 Card,
18 CardContent,
19 CardFooter,
20 CardHeader,
21} from "@/components/ui/8bit/card";
22import { Kbd, KbdGroup } from "@/components/ui/8bit/kbd";
23import {
24 advanceBrickBreaker,
25 BRICK_BREAKER_BOARD_HEIGHT,
26 BRICK_BREAKER_BOARD_WIDTH,
27 BRICK_BREAKER_FIXED_STEP,
28 BRICK_BREAKER_MAX_FRAME_DELTA,
29 type BrickBreakerEvent,
30 type BrickBreakerInput,
31 type BrickBreakerPhase,
32 type BrickBreakerState,
33 createBrickBreakerState,
34 launchBrickBreakerBall,
35 pauseBrickBreaker,
36 restartBrickBreaker,
37 resumeBrickBreaker,
38 startBrickBreaker,
39} from "@/lib/games/brick-breaker";
40import { cn } from "@/lib/utils";
41
42import "@/components/ui/8bit/styles/retro.css";
43
44const MAX_PHYSICS_STEPS_PER_FRAME = 6;
45const MAX_DEVICE_PIXEL_RATIO = 2;
46const NON_REPEAT_KEYS = new Set([" ", "p", "escape", "r"]);
47const MOVEMENT_KEYS: Readonly<Partial<Record<string, "left" | "right">>> = {
48 a: "left",
49 arrowleft: "left",
50 arrowright: "right",
51 d: "right",
52};
53
54const PHASE_LABELS: Record<BrickBreakerPhase, string> = {
55 idle: "WAITING",
56 lost: "NO SIGNAL",
57 paused: "PAUSED",
58 playing: "PLAYING",
59 ready: "READY",
60 won: "ROUTE RESTORED",
61};
62
63const ACTION_LABELS: Record<BrickBreakerPhase, string> = {
64 idle: "START GAME",
65 lost: "PLAY AGAIN",
66 paused: "RESUME",
67 playing: "PAUSE",
68 ready: "LAUNCH",
69 won: "PLAY AGAIN",
70};
71
72interface BrickBreakerHud {
73 lives: number;
74 phase: BrickBreakerPhase;
75 score: number;
76}
77
78interface CanvasColors {
79 accent: string;
80 background: string;
81 border: string;
82 foreground: string;
83 muted: string;
84 primary: string;
85 secondary: string;
86}
87
88interface FrameAdvanceResult {
89 accumulator: number;
90 events: BrickBreakerEvent[];
91}
92
93export interface NotFoundBrickBreakerProps
94 extends React.ComponentPropsWithoutRef<"section"> {
95 badge?: string;
96 cta?: string;
97 description?: string;
98 href?: string;
99 title?: string;
100}
101
102function createInputState(): BrickBreakerInput {
103 return {
104 left: false,
105 pointerX: null,
106 right: false,
107 };
108}
109
110function createHud(state: BrickBreakerState): BrickBreakerHud {
111 return {
112 lives: state.lives,
113 phase: state.phase,
114 score: state.score,
115 };
116}
117
118function getCssColor(
119 styles: CSSStyleDeclaration,
120// … truncated

What it pulls in

Other registry items

  • badge
  • button
  • card

Files it writes

  • components/ui/8bit/blocks/not-found-brick-breaker.tsx
  • lib/games/brick-breaker.ts
  • components/ui/8bit/styles/retro.css
  • components/ui/8bit/badge.tsx
  • components/ui/8bit/button.tsx
  • components/ui/8bit/card.tsx
  • components/ui/8bit/kbd.tsx

Facts

Registry
8bitcn
Type
registry:block
Access
Free
Files written
7
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

www.8bitcn.com TheOrcDev/8bitcn-ui on GitHub Raw registry item This item as JSON

More from 8bitcn

All 121 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
8-bit Advanced 1advanced18bitcnBlocksFreeno deps · 3 files
8-bit Advanced 2advanced28bitcnBlocksFreeno deps · 5 files
8-bit Advanced 3advanced38bitcnBlocksFreeno deps · 6 files
8-bit Audio Settingsaudio-settings8bitcnBlocksFree2 deps · 7 files
8-bit Chapter Introchapter-intro8bitcnBlocksFreeno deps · 3 files
8-bit Character Sheetcharacter-sheet8bitcnBlocksFreeno deps · 9 files
8-bit Chartchart8bitcnBlocksFreeno deps · 3 files
8-bit Chart Area Stepchart-area-step8bitcnBlocksFreeno deps · 3 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex