Interactions
WebGL shaderPaid

Morph Slider

A WebGL image slider that transitions between images with liquid displacement and chromatic drift.

Full-page view

Live preview

Interact with the effect here. Drag, hover, and use its controls.

Blue hour

Variation Tweaking

Adjust the options and see the preview update live.

Range motion
Transition
1.1
0.55
2.4

Installation

Install automatically via CLI or manually integrate dependencies and code.

The install command is available with paid source access.

Usage

Import the component and configure visual variants, sizes, and operational states.

import { MorphSlider } from '@/components/interactions/morph-slider'
 
<MorphSlider
items={items}
transition="ripple"
duration={1.1}
/>

Composition

Compose with icons, form triggers, and layout containers.

const items = [
{ image: '/gallery/visual-01.jpg', caption: 'Blue hour' },
{ image: '/gallery/visual-02.jpg', caption: 'Daisy' },
]
 
<MorphSlider items={items} showControls showIndicators />

API Reference

Property matrix, types, defaults, and usage descriptions.

PropTypeDefaultDescription
itemsMorphSliderItem[]built-in slidesSlides with an image URL and optional caption.
startIndexnumber0Index of the first slide.
transition
'melt''ripple''shear''swirl'
'melt'Shader transition style.
durationnumber1.1Transition length in seconds.
easestring'power2.inOut'GSAP easing name for the transition.
intensitynumber0.55Displacement intensity.
scalenumber2.4Displacement scale.
aberrationnumber0.35Chromatic aberration strength.
driftnumber0.4Ambient motion during the transition.
autoplaybooleanfalseAutomatically advances slides.
autoplayDelaynumber4Seconds between autoplay transitions.
loopbooleantrueLoops back to the first slide.
radiusnumber16Preview corner radius in pixels.
overlayColorstring'#000000'Color used by the transition overlay.
showCaptionsbooleantrueShows the active slide caption.
showControlsbooleantrueShows previous and next controls.
showIndicatorsbooleantrueShows slide position indicators.
classNamestring''Adds classes to the slider container.
...propsHTMLAttributes<HTMLDivElement>undefinedAccepts standard div attributes.

Data Attributes

State-reflecting DOM attributes for custom selector styling.

This component does not expose custom data attributes. Standard HTML data attributes are forwarded to its interactive element.

How It Works

The slider uploads the current and next images as WebGL textures, then animates a shader transition between them. GSAP controls transition timing and easing; pointer drag and navigation buttons change direction.

Accessibility

The slider provides labeled previous and next controls, slide captions, keyboard operability, and a reduced-motion path.

Keyboard Navigation
Arrow Left / RightMove between slides.
TabReach the slider controls and indicators.
Enter / SpaceActivate a focused control.

Limitations

•WebGL is required for shader transitions.
•Use image URLs that allow browser texture access, including valid cross-origin headers for remote images.

Features

•Four shader transition modes.
•Configurable easing, duration, displacement, and chromatic aberration.
•Optional autoplay, captions, controls, and indicators.
•Pointer drag navigation and looping.
Credits

Meet the team behind the interaction

Crafted for modern web applications and AI agent workflows.

Aryan

Aryan

@istmX

Building high-performance interfaces, developer tooling, and autonomous agent workflows.

Helped by
Ella

Ella

UI/UX Designer

Crafting beautiful experiences.

Kenji

Kenji

WebGL & Shader Designer

Bringing visuals to life.

Sarah

Sarah

Motion Designer

Animating the details.