OPUS/UI

Navigation

Event Horizon

hot

A black hole with gravitational lensing, a Doppler-beamed accretion disk, a photon ring and the far side of the disk bent over the shadow. It drifts toward your pointer and warps the starfield behind it.

webglpointerlensingspace6 files · 661 locdeps: clsx, tailwind-merge

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/event-horizon.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs event-horizon

Usage

import { EventHorizon } from "@/components/opus/backgrounds/event-horizon";

<EventHorizon className="absolute inset-0" />

API

PropTypeDefaultDescription
diskInner / diskOuterstring—Accretion disk temperature gradient.
nebula / backgroundstring—Space behind the hole.
sizenumber1Event-horizon radius multiplier.
tiltnumber0.28How edge-on the disk appears (0.1–1).
speednumber1Time multiplier. 0 freezes the animation; the pointer stays live.
interactivebooleantrueReact to the pointer (tracked on window, so overlaid content never blocks it).
classNamestring—Classes for the wrapper. Use `absolute inset-0` to fill a relative parent.
childrenReactNode—Optional content rendered above the canvas.

Notes

  • Renders with WebGL2 into a single full-screen triangle — no three.js, no textures, no dependencies.
  • Pauses automatically when scrolled off-screen or when the tab is hidden; resumes on return.
  • prefers-reduced-motion: reduce renders one still frame and ignores the pointer.
  • A CSS gradient fallback paints instantly and stays if WebGL2 is unavailable.

Command palette