Dillion Verma

Particles

Text 499

About

Particles are a fun way to add some visual flair to your website. They can be used to create a sense of depth, movement, and interactivity.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Particles to your project and fits it to your theme.

Code

How Particles is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import { useEffect, useState } from "react"
import { useTheme } from "next-themes"

import { Particles } from "@/components/ui/particles"

export function ParticlesDemo() {
  const { theme } = useTheme()
  const [color, setColor] = useState("#ffffff")

  useEffect(() => {
    setColor(theme === "dark" ? "#ffffff" : "#000000")
  }, [theme])

  return (
    <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">
      <span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">
        Particles
      </span>
      <Particles
        className="absolute inset-0"
        quantity={100}
        ease={80}
        color={color}
        refresh
      />
    </div>
  )
}

More by Dillion Verma

View all
  • Interactive Hover Button

    Interactive Hover Button

    3.4K
  • Rainbow Button

    Rainbow Button

    2.4K
  • Globe

    Globe

    2.2K
  • Animated Beam

    Animated Beam

    1.9K
  • Text Reveal

    Text Reveal

    1.7K
  • Sparkles Text

    Sparkles Text

    1.2K
  • Confetti

    Confetti

    1.2K
  • Interactive Icon Cloud

    Interactive Icon Cloud

    1.1K

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    103
  • Rainbow Text Effect

    Rainbow Text Effect

    47
  • Motion Blur Text

    Motion Blur Text

    36
  • Text Loop

    Text Loop

    307
  • Text Reveal

    Text Reveal

    27
  • Animated Text

    Animated Text

    8
  • Apple Hello Effect

    Apple Hello Effect

    609
  • Typography

    Typography

    4