Kinetic UI
Back to Introduction
3D Components

Liquid Mercury Droplet

An interactive 3D liquid metal chrome droplet that ripples dynamically on cursor interaction using custom GLSL shaders.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add liquid-mercury-droplet
Liquid Mercury Droplet

Installation

npx kinetic-ui-cli@latest add liquid-mercury-droplet

Architecture & Shaders

Liquid Mercury Droplet runs entirely on the GPU via Three.js and React Three Fiber.

  1. Vertex Displacement: Evaluates a classic 3D Simplex noise field combined with mouse pointer screen-space distance. As the user interacts with the canvas, exponential damping propagates concentric ripples across the sphere mesh surface.
  2. Metallic Reflection Fragment: Uses dynamic normal matrix calculations to evaluate a double Blinn-Phong specular lobe, a cubic Fresnel rim equation, and simulated horizon environment reflections with subtle chromatic aberration at grazing angles.
  3. Spring Inertia & Presentation Controls: Supports drag and touch orbiting with automatic spring-back snapping.

Usage Guide

1. Import the Component

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

import { LiquidMercuryDroplet } from "@/components/creative/liquid-mercury-droplet";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { LiquidMercuryDroplet } from "@/components/creative/liquid-mercury-droplet";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <LiquidMercuryDroplet
        viscosity{10}
        distortion{10}
        metalness{10}
      />
    </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.