CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/crystal-refraction

Crystal Refraction Field

Six raymarched octahedral crystals drift across the screen, refracting the background through each face with per-channel chromatic dispersion at the rim.

ReactWebGLImageInteractiveFont#crystals#raymarching#refraction#chromatic-aberration#premium

Usage

import CrystalRefractionField from '@crazygl/hero-crystal-refraction';

export default function Page() {
  return (
    <CrystalRefractionField
      heading="Refracted."
      subheading="Six crystals drifting through space, refracting everything behind them."
      backgroundImage="https://crazygl.com/samples/nature4.avif"
      crystalCount={6}
      refraction={1}
      chromatic={1}
    />
  );
}

Customise

  • ContentcontentType (heading / two-columns / custom), heading, subheading, or custom nodes.
  • BackgroundbackgroundImage (cover-fit, refracted through the crystals), or bgFallbackA/B/C for the procedural gradient.
  • LayoutcenterX, centerY position the cluster in the frame.
  • ArrangementcrystalCount, orbitRadius, orbitTilt, radiusJitter, bobAmount, orbitSpeed, spinSpeed.
  • Crystaltint, rimColor, refraction, chromatic, fresnel, crystalSize, speed (master time scale).
  • TypographyheadingFontFamily.

Best for

  • Luxury product and jewellery launch pages.
  • Premium SaaS, AI, fintech and crypto brand sites with a high-end feel.
  • Editorial or fashion covers wanting a tactile, light-bending centerpiece.
01 · Install the package

One command, zero config.

npm install @crazygl/hero-crystal-refraction
02 · Render the component

Import once, drop it in.

The component takes the same props you see in the live customizer on the right — every default ships poster-quality.

hero.tsx
import CrystalRefractionField from '@crazygl/hero-crystal-refraction';

export default function Landing() {
  return (
    <CrystalRefractionField />
  );
}
03 · Use it in a page

SSR-safe by default.

The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.

page.tsx
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';

import CrystalRefractionField from '@crazygl/hero-crystal-refraction';

export default function Page() {
  return (
    <section>
      <CrystalRefractionField
        heading="Say hi."
        subheading="Your new hero."
      />
      <article>
        <h2>Welcome</h2>
        <p>Your content keeps its own voice below the hero.</p>
      </article>
    </section>
  );
}
You might also like

Similar heroes

Glass Cube Maze

Raymarched lattice of transparent glass cubes drifting in 3D space. The cursor orbits the camera, and chromatic dispersion paints rainbow rims along the hits.

Logo Inside a Crystal

A slowly rotating crystal prism (3D ray-marched rounded cube) with your logo suspended inside as a glowing emissive mesh. Per-channel IOR refraction on the cube faces splits white light into rainbow seams; caustic highlights pool on the virtual floor; soft bloom on the inner emission.

Glass Panels

Liquid-glass panels in WebGL — half-sphere bevel, biconvex refraction (entry + exit + thickness), edge-weighted blur mix, multi-light Blinn-Phong specular, Fresnel rim, drop shadow. Drop in any background image and it gets bent through the glass.

Liquid Data Core

A glowing ray-marched glass sphere with refracted, dispersed inner orbits of data points — a living analytics engine that reacts to the cursor.

Cloud Flythrough

Raymarched volumetric clouds. The camera flies forward through layered FBM density; sunlight scatters through every step and god-rays peek through breaks.

Lava Lamp Blobs

Raymarched metaballs drifting through space and merging smoothly via SDF smin. Glossy + subsurface-style shading gives them a thick, viscous look.
Live customizer

Crystal Refraction Field

Background imageVisible through the crystals.BG colour A (procedural)BG colour B (procedural)BG colour C (procedural)Crystals6Orbit radius0.55Distance from each crystal to the group centre. 0 = all crystals stacked.Orbit tilt0.7How face-on you view the orbit ring. 1 = round circle (face-on); lower = elliptical, near edge-on.Radius jitter0.18Per-crystal radial wobble — gives the orbit organic variation.Vertical bob0.1Amount each crystal bobs up and down independently.Orbit speed0.18Rate at which the cluster rotates around its centre.Crystal spin1Rate at which each crystal spins on its own axes.TintRimRefraction1Chromatic dispersion1Fresnel1Crystal size0.32Time scale0.4Master time multiplier — affects both orbit and spin together.Heading FontInteractivityWhich input drives the hero — try Scroll if you want the page to drive motion.
CrazyGL · crazygl.comProgrammable hero sections for real websites.