← All components
Atmospheres / background

Prism

A luminous, grain-textured prism with three distinct rotation modes.

Open in studio ↗
PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Give the background an explicitly sized parent. Demo.tsx contains the complete composition.
  • Reduced motion renders a static state. Paused, hidden and offscreen instances stop requesting animation frames.
  • Original shader equations retained. A CSS fallback appears without WebGL2. Canvas dimensions are capped at 2048 pixels.
  • Hover uses local pointer coordinates. Offscreen suspension is always enabled. Zero-valued controls are honored.
React 19WebGL2OGL 1.0.11

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
heightnumber3.5Prism height
baseWidthnumber5.5Base width
animationType"rotate" | "hover" | "3drotate""rotate"Animation
glownumber1Glow
noisenumber0.5Grain
scalenumber3.6Scale
hueShiftnumber0Hue rotation
colorFrequencynumber1Color frequency
hoverStrengthnumber2Hover strength
inertianumber0.05Hover inertia
bloomnumber1Bloom
timeScalenumber0.5Rotation speed
transparentbooleantrueTransparent
lightModebooleanfalseLight mode
offset{ x?: number; y?: number }{ x: 0, y: 0 }Offset in CSS pixels.
timenumberundefinedExplicit shader time in seconds; stops automatic frames. Reduced motion takes precedence.
pausedbooleanfalseFreeze decorative motion; controls remain usable.
replayTokennumber0Change to reset decorative motion.
classNamestring''Additional outer classes.