Kinetic UI
Back to Introduction
Background Effects

Interactive Fluid Background

A WebGL background that behaves like colorful smoke or liquid metal responding to mouse trails.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add interactive-fluid

An advanced WebGL background shader built with react-three-fiber that simulates swirling liquid metal or colorful smoke. It calculates velocity from mouse movements to create beautiful interactive trails.

Live Preview

Interactive Fluid Background

Move Your Cursor

Interact with the fluid background

Installation

npx kinetic-ui-cli@latest add interactive-fluid

Props

Usage Guide

1. Import the Component

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

import { InteractiveFluid } from "@/components/creative/interactive-fluid";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { InteractiveFluid } from "@/components/creative/interactive-fluid";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <InteractiveFluid
        color1="example"
        color2="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.