Skip to content
synccn

Particles

Drifting particles that move away from the pointer.

Particles

Move your pointer through them.

Installation

$ pnpm dlx shadcn@latest add @synccn/particles

First time in this project? Connect synccn with one command.

Usage

import { Particles } from "@/components/ui/particles";<div className="relative"><Particles /></div>

API reference

Generated from the component's TypeScript types, so it always matches the code.

Particles

Floating particles on a canvas that drift away from the pointer. Place inside a relative container; it fills it.

  • quantity
    number

    Default 70

    Number of particles.

  • color
    string

    CSS colour. Defaults to the text colour.

  • size
    number

    Default 1.4

    Base particle radius in pixels.

  • ease
    number

    Default 0.06

    How quickly particles react to the pointer, 0–1.

  • repel
    number

    Default 80

    Radius around the pointer that pushes particles away.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • Respects the reduced motion setting