Desktop optimized

Please maximize your browser window or use a larger screen to explore the component library.

Go to home

Liquid Marble

An interactive WebGL component applying a fluid chromatic distortion that clears into a crystal lens around the cursor.

Last Modified:Aug 17, 2026

Install

CLI

liquid-marble
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/liquid-marble.json

Or install a specific demo variant:

liquid-marble-image
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/liquid-marble-image.json

Or install a specific demo variant:

liquid-marble-video
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/liquid-marble-video.json

Manual

1. Install Dependencies

Since this component leverages WebGL, you will need React Three Fiber and Three.js.

CLI Install
$pnpm add three @react-three/fiber @react-three/drei clsx tailwind-merge

Note: The demos utilize @hugeicons/react and @hugeicons/core-free-icons for the loading fallback, but they are not strictly required for the core component.

2. Add Source Code

Props

PropTypeDefaultDescription
mediaUrlstringThe source URL of the media asset.
mediaType"image" | "video""image"Defines the media type for correct texture processing.
hoverRadiusnumber0.35How wide the clarity lens spreads (0.0 to 1.0).
distortionStrengthnumber0.1How violently the liquid swirls outside the cursor.
noiseScalenumber3.0Scale of the noise. Lower = larger, sweeping waves. Higher = tighter ripples.
speednumber0.2How fast the liquid continuously flows over time.
imageZoomnumber1.2Internal zoom to prevent revealing image edges during heavy distortion.
mouseLerpSpeednumber3.0Fluidity of the mouse tracking. Lower = heavier drag.
enterLeaveSpeednumber1.5Speed at which the clarity lens fades in/out.
fallbackReact.ReactNodenullOptional fallback UI rendered via Suspense while media loads.
classNamestringundefinedStandard React classNames for the container wrapper.