Interactions
ShadersFree

Interactive WebGL

GPU-accelerated procedural shader canvas with fluid ripples, ordered dither matrices, and wireframe meshes reacting to pointer velocity.

Full-page view

Live preview

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

Variation Tweaking

Adjust the options and see the preview update live.

Shader Preset
1

Installation

Install automatically via CLI or manually integrate dependencies and code.

$npx @istmx/ui add interactive-webgl

Usage

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

import { InteractiveWebGL } from '@/components/interactions/interactive-webgl'
 
<InteractiveWebGL
preset="fluid"
showControls
/>

Composition

Compose with icons, form triggers, and layout containers.

<div className="aspect-[4/3] w-full max-w-2xl overflow-hidden rounded-3xl border border-border">
<InteractiveWebGL
preset="fluid"
showControls
/>
</div>

API Reference

Property matrix, types, defaults, and usage descriptions.

PropTypeDefaultDescription
preset
'fluid''dither''mesh'
'fluid'Shader rendering mode.
showControlsbooleantrueWhether to show the floating preset toggle.
speednumber1Time multiplier for wave propagation.
onPresetChange(preset: WebGLPreset) => voidundefinedCallback triggered when preset changes.

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

A WebGL fragment shader calculates real-time distance field ripples and spatial coordinate quantization on a single 2D quad, pausing GPU rendering automatically when out of viewport.

Accessibility

Focusable GPU canvas container with keyboard controls and fallback handling.

Keyboard Navigation
TabFocus preset controls.
Enter / SpaceToggle shader preset.

Limitations

•Requires WebGL-enabled hardware accelerator.

Features

•Interactive fluid ripple distance field displacement.
•Ordered dither pattern simulation with spatial quantization.
•Wireframe mesh wave functions.
•60fps rendering with IntersectionObserver viewport gating.
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.