ham7a311

Firefly Sync

Backgrounds

About

An animated canvas background of fireflies drifting over a meadow at dusk, each blinking on its own clock and gradually falling into sync with its neighbours, with the pointer acting as a lantern that pulls nearby fireflies off-beat.

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

Code

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

Usage.tsx

"use client";

import { FireflySync } from "@/components/ui/firefly-sync";
import { useState } from "react";

export default function Demo() {
  const [r, setR] = useState(0);
  return (
    <div className="w-full h-screen">
      <FireflySync theme="dusk" onSync={setR} className="h-full w-full">
        <div className="pointer-events-none flex h-full flex-col justify-between p-6 text-white">
          <div>
            <p className="font-mono text-[11px] uppercase tracking-[0.16em] text-white/55">
              Wadi Bani Khalid · 19:40
            </p>
            <h2 className="mt-3 max-w-[14ch] text-[clamp(1.8rem,4.6vw,3.2rem)] font-semibold leading-[1.05] tracking-[-0.03em]">
              Some evenings are worth staying out for.
            </h2>
          </div>
          <p
            className="font-mono text-[11px] uppercase tracking-[0.16em] text-white/45 tabular-nums"
            aria-live="off"
          >
            In step · {Math.round(r * 100)}%
          </p>
        </div>
      </FireflySync>
    </div>
  );
}

More by ham7a311

View all
  • Wave Mesh

    Wave Mesh

    216
  • Route Globe

    Route Globe

    171
  • Glass Tiles

    Glass Tiles

    159
  • Orbit Ring Stats

    Orbit Ring Stats

    71
  • Glyph Swell

    Glyph Swell

    66
  • Fan Deck Card

    Fan Deck Card

    54
  • Ask Bar

    Ask Bar

    52
  • Glass Ribbons

    Glass Ribbons

    46

More in Backgrounds

View all
  • Elegant Dark Pattern

    Elegant Dark Pattern

    944
  • Light theme Tailwind CSS Background Snippet

    Light theme Tailwind CSS Background Snippet

    259
  • Honey Ember Background

    Honey Ember Background

    100
  • Gradient Backgrounds

    Gradient Backgrounds

    33
  • Tailwind CSS Background Snippet

    Tailwind CSS Background Snippet

    623
  • Gradient Blur Bg

    Gradient Blur Bg

    23
  • Background snippets

    Background snippets

    117
  • Dark Gradient Background

    Dark Gradient Background

    164