Grid Distortion

WebGL-based grid distortion effect that warps images based on mouse interaction. Features Three.js shader materials, configurable grid size, and smooth relaxation effects.

Main Features of Grid Distortion

How to Use Grid Distortion in Next.js

Installation Guide for Grid Distortion

Props

Customize the component with these props

PropertyTypeDefaultDescription
grid
number20Grid size for distortion effect.
mouse
number0.3Mouse influence strength.
strength
number0.15Distortion strength multiplier.
relaxation
number0.1Relaxation speed for smooth transitions.
imageSrc
stringundefinedSource URL of the image to distort.
className
stringundefinedAdditional CSS classes for custom styling.

When to Use

Ideal for creative studios, experimental art projects, and Next.js portfolios that want an interactive 'Grid Distortion' aesthetic. Use this shader effect for an immersive experience where images warp and 'melt' based on cursor movement.

Best Practices

Follow React best practices by pairing this with high-contrast, bold imagery. Maintain consistent spacing within your design system by keeping the grid resolution balanced. Optimize for performance by managed the Three.js relaxation cycle.

Why This Component Matters in Modern UI Development

Interactive grid distortion creates a sense of digital 'Fluidity' and spatial power. This production-ready UI template helpsคุณ build an interface that feels responsive and high-end, adding a unique architectural signature to your brand imagery.

Frequently Asked Questions

QWhat is 'Relaxation'?

The `relaxation` prop (0.1) controls how fast the grid 'recoils' back to its original state after the cursor ceases movement, ensuring smooth motion.

QCan I adjust the grid density?

Yes, the `grid` prop (default 20) allows you to control how 'chunky' or 'fluid' the distortion feels across the image surface.

QHow heavy is the shader?

The component uses localized vertex shaders that are optimized for high performance, ensuring 60FPS even with complex interactive warping on modern GPUs.

Grid Distortion - Experimental React Components | Uilora