Particles Background

An interactive 3D particle system that responds to user interaction.

A customizable 3D particle system that creates an engaging background effect. The particles respond to user interaction, creating a dynamic and immersive experience.

Preview

Usage

The Particles Background component creates a dynamic 3D particle system that can be customized to match your design. It's perfect for hero sections, landing pages, and other areas where you want to create visual interest.

Features

  • Interactive Particles: Creates a dynamic 3D particle system that responds to user interaction.
  • Mouse Tracking: Particles move and react when the user moves their cursor.
  • Customizable Colors: Choose from a variety of color schemes or create your own.
  • Dark/Light Mode Support: Automatically adjusts to match your site's theme.
  • Performance Optimized: Designed to run smoothly even with hundreds of particles.
  • Responsive Design: Adapts to different screen sizes and devices.
  • Easy Integration: Simple to add to any Vue or Nuxt project.

Component Code

Particles.vue
index.ts

Props

PropTypeDefaultDescription
particleCountnumber300Number of particles to display
particleSpreadnumber15How spread out the particles are
speednumber0.07Animation speed of the particles
particleColorsstring[]['#ffffff', '#a855f7', '#6366f1', '#ec4899']Array of colors for the particles
moveParticlesOnHoverbooleantrueWhether particles react to mouse movement
particleHoverFactornumber1.5How much particles move on hover
alphaParticlesbooleanfalseWhether particles have transparency
particleBaseSizenumber100Base size of particles
sizeRandomnessnumber1Random variation in particle size
cameraDistancenumber20Distance of the camera from the particles

Credits