Desktop optimized

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

Go to home

Glass Slices

An interactive WebGL component splitting media into vertical glass slices that dynamically tilt, compress, and refract based on cursor proximity.

Last Modified:Aug 17, 2026

Install

CLI

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

Or install a specific demo variant:

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

Or install a specific demo variant:

glass-slices-video
$pnpm dlx shadcn@latest add https://ui.satisium.com/r/glass-slices-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.
slicesnumber24Number of vertical glass slices to split the image into.
hoverRadiusnumber0.25Radius of the hover wave (normalized 0.0 to 1.0).
minSliceWidthnumber0.55How compressed/tilted the slice gets at the peak of the wave (0.0 to 1.0).
shiftYnumber0.1How far the slice shifts down on the Y-axis when hovered.
imageZoomnumber1.15How much the image internally zooms in when the slice tilts (refraction effect).
mouseLerpSpeednumber3.0Fluidity of the mouse tracking. Lower = heavier/slower drag.
enterLeaveSpeednumber2.0Speed at which the effect fades in/out when entering/leaving.
fallbackReact.ReactNodenullOptional fallback UI rendered via Suspense while media loads.
classNamestringundefinedStandard React classNames for the container wrapper.