Kinetic UI
Back to Introduction
Hero Components

HeroParticles

An interactive HTML5 canvas particle background reacting with fluid repulsion forces on cursor proximity.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add hero-particles

The HeroParticles component initializes a high-performance rendering loop using HTML5 Canvas to control an array of floating dot nodes and connection threads. When the mouse moves, nodes automatically calculate repulsion vectors relative to the coordinates to create organic shockwaves.

Live Preview

Hero Particles
Hover around the card area

Performance Notes

Canvas rendering performance is linked directly to Node density. Keeping counts below 120 (and 60 on mobile viewports) keeps drawing times under 1.5ms per tick, which guarantees solid 60fps on average mobile devices.

Usage Guide

1. Import the Component

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

import { HeroParticles } from "@/components/creative/hero/hero-particles";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { HeroParticles } from "@/components/creative/hero/hero-particles";

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