Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retrowin/llms.txt
Use this file to discover all available pages before exploring further.
CRTOverlay renders an invisible full-screen layer that transforms the RetroWin desktop into a convincing CRT monitor simulation. It applies two CSS classes — .crt-flicker (a subtle brightness animation) and .scanlines (repeating horizontal lines) — at 20 % opacity with mix-blend-mode: overlay, so the effect tints the content beneath it without obscuring readability. The overlay sits above all other UI at z-index: 100 but is completely non-interactive (pointer-events: none).
CRTOverlay accepts no props. Mount it once at the application root, alongside Taskbar.
Usage
Accessibility — prefers-reduced-motion
CRTOverlay reads the (prefers-reduced-motion: reduce) media query via window.matchMedia and responds to changes in real time using an EventListener on the MediaQueryList. When the user has requested reduced motion:
- The
.crt-flickerclass is omitted — the brightness animation stops. - The
.scanlinesclass is omitted — the repeating line pattern is removed.
mix-blend-mode base style, but all animated or visually intense effects are stripped away.
Internal State
| State variable | Type | Description |
|---|---|---|
s | boolean | true when the OS/browser reports prefers-reduced-motion: reduce. When true, the animation classes are not applied. |
Notes
The overlay uses
aria-hidden="true" so screen readers skip it entirely. It has no semantic role — it is purely decorative.The
.crt-flicker and .scanlines CSS classes must be defined in your global stylesheet (or Tailwind plugin). The component itself only applies the class names; the keyframe definitions live outside the component.