tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Fractal Glass Hero

Fractal Glass Hero

PreviousNext

A Three.js hero that refracts its background image through animated glass stripes and follows the cursor with smooth parallax.

Open in
fractal-glass-hero-demo
Portrait of a woman in dappled afternoon light and leaf shadow
Vitreo
IndexPracticeEnquire

We shape the slow moment between a glance and a look.

Vitreo Studio, Lisbon 2026

components/ui/fractal-glass-hero-demo.tsx
import { FractalGlassHero } from "@/registry/tween/fractal-glass-hero"

export function FractalGlassHeroDemo() {
  return <FractalGlassHero />
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/fractal-glass-hero.json

Usage

import { FractalGlassHero } from "@/components/ui/fractal-glass-hero"
<FractalGlassHero
  imgSrc="https://example.com/hero.jpg"
  imgAlt="Portrait lit through fluted glass"
  headline="We shape the slow moment between a glance and a look."
  caption="Vitreo Studio, Lisbon 2026"
/>

The hero renders the source image to a Three.js plane and samples it through a stripe of refracted glass that tracks the cursor with eased parallax. Tune glassStrength and stripesFrequency to dial the distortion in or out, and lerpFactor to control how loosely the effect follows the pointer. Users with prefers-reduced-motion: reduce see a static <img> fallback instead of the animated canvas.

Props

PropTypeDefaultDescription
imgSrcstringdefault heroSource URL of the hero image.
imgAltstringportrait altAlt text for the fallback <img> shown to reduced-motion users.
brandReactNodeVitreo + markTop-left brand link content.
navLinksFractalGlassNavLink[]3 defaultsTop-right nav links — each { label, href? }.
headlineReactNodeDefault copyBottom-left headline.
captionReactNodeDefault copyBottom-right caption.
lerpFactornumber0.035Per-frame interpolation toward the cursor target. Lower = more drift.
parallaxStrengthnumber0.1Base parallax amplitude before distortion amplification.
distortionMultipliernumber10How much the distorted region amplifies the parallax offset.
glassStrengthnumber2.0Stripe displacement strength.
glassSmoothnessnumber0.0001Offset between the 11 averaged samples — raise for softer stripes.
stripesFrequencynumber35Number of vertical stripes across the image width.
edgePaddingnumber0.1Fraction of the width where the distortion fades to none at the left and right edges.
classNamestring—Extra classes on the outer section.
Panel Assembly TransitionFluid Cursor Canvas

On This Page

InstallationUsageProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page