crucıble

Arcade

8-bit attract-mode background: a chunky pixel starfield drifting on three parallax depth layers, seeded space-shooter sprites gliding across on a two-frame flap, and a faint pixel grid receding to a horizon. Crisp unsmoothed pixels. Canvas 2D, seeded, offscreen-paused, reduced-motion-safe.

canvasfree

Installation

CLI

npx shadcn@latest add @crucible/arcade

Props

PropTypeDefaultDescription
colorsstring[]["#eaf6ff", "#7fdfff", "#4aa6ff"]Star / grid / sprite palette, brightest → deepest. Index 0 is the near (foreground) star + sprite tint, 1 the mid layer + floor grid, 2 the far layer. Extra entries recolor the drifting sprites. Defaults to a cool cyan-to-indigo starfield on near-black — pass warm tones for a synthwave cabinet or all-white for classic mono.
speednumber1Drift / flap / floor-scroll speed multiplier. 1 = default.
intensitynumber1Overall star brightness and grid/sprite opacity, 0–2.
densitynumber1Star-count multiplier across all layers, 0.2–3.
pixelSizenumber3Chunk size of one "pixel" in CSS px — the whole scene snaps to it. Clamped 2–8.
dprnumber2devicePixelRatio ceiling. Clamped 1–2.
pausedbooleanfalseFreeze the scene at a static, populated attract-mode frame.
Also accepts all props of React.ComponentPropsWithoutRef<"div">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.