Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-mode-arcade/llms.txt
Use this file to discover all available pages before exploring further.
CRTOverlay drapes a persistent cathode-ray tube illusion over the entire viewport. It stacks three visual layers — a static scanline grid, a looping bright bar that travels down the screen, and a radial vignette that darkens the edges — to make every page feel like it’s being displayed on a genuine arcade monitor. Because it uses pointer-events-none, it never interferes with clicks, keyboard focus, or any other interactivity beneath it.
Usage
Place<CRTOverlay /> once, at the very top of your app’s render tree, outside any route or page component. It positions itself with fixed inset-0, so it will always cover the full viewport regardless of scroll position or page content.
CRTOverlay accepts no props. It is a pure presentational component with a fixed, intentional appearance. Configuration is done by editing the CSS utilities it relies on — scanlines-bg and animate-scanline — in assets/main.css.Layer Breakdown
CRTOverlay renders a single div with three absolutely-positioned children, each responsible for one visual layer.
Layer 1 — Scanlines background
scanlines-bg utility class. This class generates a repeating linear gradient that alternates between transparent and a semi-transparent black every 2px, producing the classic horizontal line raster pattern:
mix-blend-overlay mode ensures the scanlines interact naturally with the colors beneath rather than simply darkening them, and opacity-40 keeps them subtle.
Layer 2 — Animated scanline bar
h-32) horizontal bar with a soft white gradient feathered at both edges. It continuously travels from the top to the bottom of the container using the animate-scanline keyframe animation:
linear timing give it the slow, steady sweep of a CRT refresh cycle. The bar is very faint (opacity-50, and the via-color is only 5% white) so it reads as a subtle sheen rather than a distracting flash.
Layer 3 — Vignette
#0A0510) at the outer edges. This replicates the natural falloff of brightness toward the bezels of a CRT tube and gives every page a subtle tunnel-vision focus toward the center.
Stacking Context
CRTOverlay is positioned fixed with z-50, placing it above virtually all other content in the app. The full class breakdown of the outer wrapper:
| Class | Effect |
|---|---|
fixed inset-0 | Covers the full viewport; does not scroll with page content |
pointer-events-none | All mouse, touch, and keyboard events pass through to content below |
z-50 | Sits above page content, modals at lower z-indices, and navigation layers |
overflow-hidden | Clips the animated scanline bar so it doesn’t create scrollbars as it exits the top or bottom |
If your project uses modals, tooltips, or dropdowns with a
z-index above 50, they will render on top of the CRT effect — which is usually desirable. If you want the CRT to overlay everything (including modals), increase the z-50 class to z-[100] or higher.CSS Utilities Reference
Two custom utility classes fromassets/main.css power the effect:
| Utility | Definition | Used In |
|---|---|---|
scanlines-bg | Repeating 4px linear gradient (transparent / rgba(0,0,0,0.25)) | Layer 1 |
animate-scanline | scanline keyframe, 8s linear infinite | Layer 2 |
reference/animations for the full list of custom animation utilities.
Related
ArcadeButton
Neon pixel-font buttons that live beneath the CRT overlay.
Page Transition
CRT power-on enter/exit animation wrapping each page’s content.
Animations Reference
All custom keyframes and animation utilities used in the project.
Design Tokens
Arcade color palette including the
arcade-bg value used in the vignette.