Skip to content
VenusUI
Get started

Particle Wave

A WebGL field of points rolling like a wave, for hero and section backgrounds.

Preview

Installation

npx shadcn@latest add @venusui/particle-wave

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/hooks/use-scene-state.tsfrom use-scene-state
  • @/components/ui/particle-wave.tsx

Usage

The code behind the preview above.

particle-wave-demo.tsx

import { ParticleWave } from "@/components/ui/particle-wave"

export default function ParticleWaveDemo() {
  return (
    <div className="relative w-full max-w-2xl overflow-hidden rounded-xl border bg-background">
      <ParticleWave className="text-muted-foreground" />
      <p className="absolute inset-x-0 top-6 text-center text-xl font-semibold tracking-tight">Signals, not noise</p>
    </div>
  )
}

API reference

PropTypeDefaultDescription
columnsnumber70Points along the width.
rowsnumber40Points along the depth.
amplitudenumber0.6Wave height.
labelstring"Animated wave of particles"Accessible description.
classNamestring—Classes for the wrapper, e.g. a height or text color.

Only the props above.

Requirements

  • three and @react-three/fiber. The CLI installs both, plus @types/three as a dev dependency.
  • A browser with WebGL.

Customization

  • Use it as a background: place it absolute inset-0 inside a relative section and put content above it.
  • A muted color (text-muted-foreground) keeps text on top readable.
  • Lower columns × rows for slower devices; 70 × 40 is 2,800 points.

Accessibility

  • Exposed as a labelled image; decorative motion.
  • Pauses off screen and with reduced motion.

Troubleshooting

Nothing appears.
The wrapper needs a height (it is h-72 by default).
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

A CSS-only cube with six content faces that tumbles slowly and pauses on hover.

Loading preview

A tilted wall of vertically scrolling columns, for screenshots and showcases.

Loading preview

A dotted 3D Earth with glowing routes between cities; pulses travel each arc and ripple where they land.