Skip to content

COMPONENT / crt-overlay

CRT Overlay_

Scanlines, a vignette and a sub-3Hz flicker laid over its children like an old monitor. Pure CSS; the flicker is off under reduced motion. Requires @cybr/tokens and @cybr/effects.

Install

  1. 1. Map the @cybr namespace, once per project. Add this inside your components.json, or into its existing "registries" object. No components.json yet? Run npx shadcn@latest init first to create one.

    "registries": { "@cybr": "https://cybr-ui.com/r/{name}.json" }
  2. 2. Add components:

    $ npx shadcn@latest add @cybr/crt-overlay

If shadcn reports Unknown registry "@cybr", step 1 is missing from that project's components.json.

Preview

NO CARRIER

CH 03 · RETRY IN 05

04 / CRT OVERLAY

SCANLINES · VIGNETTE · FLICKER < 3HZ

Props

Component props
PropTypeDefaultDescription
vignettebooleantrueDarken the edges toward --ground-void.
flickerbooleantrueTwo faint opacity dips every 4s on the whole screen, children included.
...propsComponentProps<"div">—Every other native <div> attribute is forwarded; className is merged last with cn(). Give the root a height (or content) and any layout classes; they apply to the children directly.

Usage

Needs the stylesheets from @cybr/tokens and @cybr/effects. After the install, import them in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
@import "../styles/cybr-effects.css";
import { CrtOverlay } from "@/components/ui/crt-overlay";

export function SignalLost() {
  return (
    <CrtOverlay className="flex min-h-80 items-center justify-center">
      <p className="font-display text-display-md text-signal">NO CARRIER</p>
    </CrtOverlay>
  );
}

States

Accessibility