Kinetic UI
Back to Introduction
Media

Diffusion Image Reveal

A WebGL shader component that loads images with an AI-like watercolor diffusion effect instead of a boring blur or skeleton.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add diffusion-image-reveal
Diffusion Image Reveal

Scroll down or wait for the component to intersect to see the shader transition.

Installation

npx kinetic-ui-cli@latest add

Usage

This component takes a standard image source and renders it onto a WebGL plane using `@react-three/fiber`. It uses an intersection observer to trigger a custom simplex-noise fragment shader when the image scrolls into view.

import { DiffusionImageReveal } from "@/components/creative/diffusion-image-reveal";

export function HeroSection() {
  return (
    <div className="w-full">
      <DiffusionImageReveal 
        src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop" 
        className="w-full max-w-lg mx-auto"
      />
    </div>
  );
}

Props

PropTypeDefaultDescription
srcstringundefinedThe URL of the image to reveal.
classNamestringundefinedAdditional CSS classes for the container. Make sure it has a width and height.

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { DiffusionImageReveal } from "@/components/creative/diffusion-image-reveal";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { DiffusionImageReveal } from "@/components/creative/diffusion-image-reveal";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <DiffusionImageReveal
        src="example"
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.