crucıble

Tempered

A scroll-scrubbed tempering shader: white-hot amber turbulence at the top of the page cools through ember red into blued violet-steel with oxidation bands — and scrolling back genuinely reheats. GSAP ScrollTrigger drives an original OGL fragment shader, with idle micro-motion, custom phase keyframes, and a static mid-temper frame under reduced motion.

oglpro

Installation

CLI

npx shadcn@latest add @crucible/tempered

Manual — install dependencies, then copy the source

npm install ogl gsap

Props

PropTypeDefaultDescription
phasesTemperPhase[]the tempering sequence: white-hot amber at the top, ember red mid-page, blued violet-steel with oxidation bands at the bottom. Scrolling back up genuinely reheatsPhase keyframes mapping scroll position to color. Interpolated linearly between entries (sorted by at).
scrubnumber0.8Scrub smoothing in seconds — how long the shader takes to catch up to the scrollbar (GSAP ScrollTrigger scrub). 0 locks it hard to the wheel.
idleMotionnumber0.5Idle micro-motion (0–1): how much the surface keeps shimmering once scrolling stops. 0 freezes dead between scrolls.
scrollerstring | Element | React.RefObject<HTMLElement | null>the window, mapped over the full document scroll rangeThe scroll container whose progress drives the temper. Accepts a selector, element, or ref to an overflow-y-auto container.
speednumber1Idle shimmer speed multiplier (scroll scrubbing is unaffected).
intensitynumber1Overall brightness multiplier.
heatnumber1Forge heat (0–1): scales glow, bloom, and turbulence energy together.
pausedbooleanFreeze the render loop, holding the current frame.
classNamestringExtra classes for the wrapper. Positioned absolute inset-0 -z-10.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.