OPUS/UI

Navigation

ASCII Field

Two octaves of noise rendered through a character ramp — terminal art that breathes. The pointer sends ripples through the field and brightens what it touches.

canvastextnoisepointer5 files · 384 locdeps: clsx, tailwind-merge

Installation

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

npx shadcn@latest add https://opusui.131199999.xyz/r/ascii-field.json

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

node ../tailwind_component/opus55/scripts/add.mjs ascii-field

Usage

import { AsciiField } from "@/components/opus/backgrounds/ascii-field";

<AsciiField ramp=" .:-=+*#%@" className="absolute inset-0" />

API

PropTypeDefaultDescription
color / highlightstring—Dim and bright character colours.
rampstring" .:-=+*#%@"Characters from dark to bright.
cellnumber14Character cell size (px).
scalenumber1Noise zoom.
interactivebooleantrueReact to the pointer (tracked on window).
classNamestring—Wrapper classes — `absolute inset-0` to fill a relative parent.
childrenReactNode—Optional content rendered above the canvas.

Notes

  • Canvas 2D with a device-pixel-ratio aware backing store (capped at 2×).
  • The animation loop stops off-screen and in hidden tabs; resize re-seeds the scene.
  • prefers-reduced-motion: reduce draws a single static frame.

Command palette