Sparkles

A configurable sparkles component that can be used as a background or as a standalone component.

Examples

Sparkles Full Page

API

Prop NameTypeDefaultDescription
backgroundstring'#0d47a1'Background color of the container. Use 'transparent' to see through to parent element.
particleColorstring'#ffffff'Color of the particles. Accepts any valid CSS color value.
minSizenumber1Minimum size of particles in pixels.
maxSizenumber3Maximum size of particles in pixels.
speednumber4Movement speed multiplier. Higher values create faster movement.
particleDensitynumber120Number of particles to render. Higher values create denser particle fields.

Component Code

You can copy and paste the following code to create these components:

Sparkles.vue

Credits