Particle Whirlpool Background

An animated background with swirling particles.

Examples

Without blur and overlay

API

Prop NameTypeDefaultDescription
classstring""Additional CSS classes for custom styling.
blurnumber0Amount of blur to apply to the background, specified in pixels.
particleCountnumber2000Number of particles in the whirlpool animation.

Component Code

You can copy and paste the following code to create this component:

ParticleWhirlpoolBg.vue

Features

  • Interactive Whirlpool Animation: Renders a captivating whirlpool effect with particles that respond to mouse and touch interactions.
  • Customizable Particle Count: Adjust the particleCount prop to control the number of particles in the animation.
  • Dynamic Blur Effect: Use the blur prop to apply a blur effect over the background, enhancing the visual depth.
  • Slot Support: Overlay additional content on top of the animation using the default slot.
  • Responsive Design: The component adjusts to fit the width and height of its parent container, ensuring compatibility across different screen sizes.

Credits

  • Built with the Three.js library for 3D rendering and animations.
  • Inspired by TroisJs