TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/player-one/llms.txt
Use this file to discover all available pages before exploring further.
CRTOverlay component reproduces the visual artifacts of a cathode-ray tube monitor using only CSS — no canvas, no WebGL. It outputs two sibling div elements that sit at the very top of the stacking order and span the full viewport. Both carry pointer-events-none so they never interfere with user interaction, and both are purely decorative, adding depth and retro atmosphere to every screen in the app.
No Props
CRTOverlay accepts no props. The effect is intentionally global and uniform — drop it in and it works.
Usage
The Navigation component renders its own internal
CRTOverlay inside the stage-select modal. This is intentional — the effect on the modal is independent of the root-level overlay, and stacking them deepens the aesthetic when the modal is open.The Two Layers
Layer 1 — .crt-overlay (z-index: 9999)
This is the primary effect layer. It applies three visual techniques simultaneously:
Scanlines
Horizontal scanlines are drawn using a repeating linear-gradient:
text-shadow/filter combination introduces lateral color separation (chromatic aberration) that mimics the slight misalignment of RGB phosphor groups on a real CRT. This gives text and edges a faint red/blue halo.
Flicker Animation
The overlay’s opacity is animated with a CSS @keyframes flicker rule:
Layer 2 — .crt-vignette (z-index: 9998)
The vignette layer sits one step below the scanline overlay and darkens the edges of the viewport using a radial gradient:
Full CSS Reference
Implementation Notes
Where It’s Used
CRTOverlay appears in two places in the app:
- Root layout — mounted once alongside
HUDandNavigation, covering every page at all times. - Navigation modal — mounted inside the full-screen stage-select overlay to give the modal its own self-contained CRT treatment.