CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/glass-panels

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.

ReactWebGLImageInteractiveFont#glass#glassmorphism#liquid-glass#refraction#chromatic-aberration#fresnel#shader#image-input#premium

Usage

import GlassPanels from '@crazygl/hero-glass-panels';

export default function Page() {
  return (
    <GlassPanels
      backgroundImage="/photos/nature.avif"
      refraction={1.21}
      chromatic={0.29}
      blur={0}
    />
  );
}

Customise

  • Content — single heading panel, two-column (two panels), or custom node.
  • Behaviordraggable, pointerTilt.
  • BackgroundbackgroundImage, blur (frosted body).
  • Glass shapecornerRadius, bevelDepth.
  • Glass physicsrefraction, chromatic, fresnel, gloss, edgeHighlight, tint, brightness, saturation.
  • Shadowshadow, shadowSpread, shadowOffsetY.

Inputs you can plug in

  • Background image — Any JPG, PNG, WebP, or AVIF. This is the scene the glass refracts, so a photo with depth, color, and soft shapes reads far better than flat artwork. Leave it empty to fall back to the built-in mesh gradient.

Notable controls

  • Refraction (0–2.5, sweet spot around 1.0–1.4) — how hard the glass bends the background. Push it up for a heavy lens, down for near-flat glass.
  • Bevel depth (4–120px, default 58) — how thick the slab appears; it drives how strongly the rim refracts. Drop to ~15px for a thin glass plate.
  • Chromatic dispersion (0–3, try 0.2–0.4) — the rainbow split at the silhouette. A little reads as polished glass; 1.0+ goes into prism territory.
  • Frosted blur (0–60px) — how blurry the body renders the background. 0 keeps it clear; 20–40px gives a proper frosted look while the rim stays crisp.
  • Pointer tilt (0–2.5) — how much panels rotate toward the cursor. 0 for static plates, ~1.0 for a clean 3D-card lean.
01 · Install the package

One command, zero config.

npm install @crazygl/hero-glass-panels
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 GlassPanels from '@crazygl/hero-glass-panels';

export default function Landing() {
  return (
    <GlassPanels />
  );
}
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 GlassPanels from '@crazygl/hero-glass-panels';

export default function Page() {
  return (
    <section>
      <GlassPanels
        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

Liquid Glass Badge Logo

Your logo becomes a thick translucent liquid-glass badge that refracts a user-supplied photograph through its biconvex body. Per-channel IORs paint a real rainbow seam at the rim, the interior reads as frosted glass, and a 4-light Blinn-Phong studio rig sells the volume. Falls back to a rotating gradient backdrop when no image is supplied.

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.

Rain on Glass

Looking through a glass pane in the rain — droplets refract the background, slide down with gravity, and leave thin trails.

Glass Tile Logo

The logo is reconstructed from a grid of small glass blocks. Each tile floats apart, refracts the background through real MeshPhysicalMaterial transmission, then assembles into the silhouette on load. Hover separates the tiles slightly. Built with Three.js InstancedMesh + HDRI reflections + soft contact shadows.

Glass Logo Sculpture

Upload a logo (SVG / PNG / GLB) and watch it become a real 3D glass paperweight: Three.js MeshPhysicalMaterial with true volumetric transmission, per-wavelength dispersion, clearcoat, Beer-Lambert attenuation, ContactShadows, an HDRI-lit studio rig and pointer-driven parallax orbit that visibly bends the photographic background through the body.

Typography Through Rainy Glass

A large bright headline sits behind a fogged glass pane covered in sliding water droplets. The drops refract the type; the cursor wipes a clear arc as you move.
Live customizer

Glass Panels

Allow dragging panelsWhen on, the panels can be dragged with the pointer. They stay clamped to the hero bounds.Pointer tilt1How much the panels tilt toward the cursor. 0 = no tilt, 1 = default, higher exaggerates the 3D-card effect.Background ImageVisible through the glass. Leave empty for the built-in mesh gradient.Frosted blur0pxHow blurry the body of the glass renders the background.Corner radius76pxBevel depth58pxHow thick the glass appears. Drives the refraction strength at the rim.Refraction1.21How strongly light bends through the glass.Chromatic dispersion0.29Per-channel offset — the rainbow rim of real glass.Fresnel0.8Edge brightening as the surface tilts away from view.Specular gloss0Strength of the studio highlights on the glass face.Edge highlight0.45Inner stroke + rim glow.Cool tint0.37Brightness-0.18Saturation0.15Shadow strength0.55Shadow spread36pxShadow Y offset14pxHeading FontInteractivityWhich input drives the hero — try Scroll if you want the page to drive motion.
CrazyGL · crazygl.comProgrammable hero sections for real websites.