Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/press-start/llms.txt
Use this file to discover all available pages before exploring further.
CRTOverlay layers two always-on-top visual effects over the entire page to simulate the look of an old cathode-ray tube monitor: a repeating scanline gradient and a dark radial vignette that dims the corners of the screen. A small toggle button in the bottom-right corner lets the visitor switch the effects on or off, and the component automatically disables them when the operating system’s prefers-reduced-motion setting is active.
Props
This component accepts no props. All state — whether the overlay is currently visible — is managed internally withReact.useState.
Usage
Overlay layers
The component renders two visual layers plus one interactive element:1. Scanline gradient (z-[9999])
A fixed inset-0 div with the CSS class crt-overlay. This class applies a repeating linear gradient background at background-size: 100% 4px to draw horizontal scanlines across the full viewport. It is composited with mix-blend-overlay opacity-70 so the underlying content remains legible.
div that renders the radial vignette:
2. Toggle button (z-[10000])
A fixed bottom-4 right-4 button that sits one z-index step above the overlay layers so it is always clickable. It uses two icons from lucide-react:
MonitorOff— shown when the CRT effect is active (click to disable)MonitorPlay— shown when the CRT effect is inactive (click to enable)
CRT FX: ON / OFF is hidden on small viewports (hidden sm:inline) to keep the UI clean on mobile.
Reduced-motion behaviour
During mount, the component runs:enabled is false, the scanline and vignette divs are not rendered at all — the effect is not merely paused but entirely removed from the DOM.
CRTOverlay should be mounted at the application root, outside any
overflow-hidden containers. Because both layers use position: fixed, they
always cover the full viewport regardless of scroll position. Placing the
component inside a clipped container will cause it to be cropped.