Kinetic UI
Back to Introduction
3D Components

Particle System

A high-performance WebGL particle cloud that reacts to mouse physics.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add particle-system
Particle System

Interact.

Installation

npx kinetic-ui-cli@latest add particle-system

Architecture

This component leverages Float32Array buffers inside a raw Three.js <bufferGeometry> to achieve maximum performance. Instead of rendering thousands of React nodes, it renders a single mesh consisting of thousands of vertices.

During the useFrame loop, the distances between the normalized mouse coordinates and each vertex are calculated. If the mouse comes within the repulsion threshold, the vertex is pushed away using inverse square forces, and slowly interpolates back to its origin using a spring factor.

Usage Guide

1. Import the Component

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

import { ParticleSystem } from "@/components/creative/particle-system";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { ParticleSystem } from "@/components/creative/particle-system";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <ParticleSystem
        count{10}
        color="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.