Falling Stars Background

A stunning animated starfield background with glowing and sharp trail effects.

API

Prop NameTypeDefaultDescription
colorstring"#FFF"Color of the stars in the starfield.
countnumber200Number of stars displayed in the animation.

Component Code

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

FallingStarsBg.vue

Features

  • Dynamic Starfield: Creates a 3D starfield effect with stars moving toward the viewer.
  • Glowing and Sharp Trail Effects: Each star has a sharp line and a blurred, glowing trail.
  • Customizable: Adjust the color of the stars and control the number of stars using the count prop.
  • Responsive Design: Automatically adapts to the size of the canvas, ensuring a full-screen starfield effect.

Credits

  • Inspired by 3D starfield simulations and trail effects in modern canvas animations.
  • Credit to Prodromos Pantos for porting the original component to Vue & Nuxt.