Fireflies & Seasons
Fireflies, snow, paper or autumn leaves drifting over your page — drawn like the real thing, with real-world physics and soft shadows.
- Zero dependencies
- React + Tailwind
- Accessible
- Reduced-motion aware
fireflies.zip · source file + README with usage and props
Preview
Fireflies · Glowing fireflies blinking in near-sync. style="fireflies"
One canvas, four styles. Leaves (maple, oak, birch with veins) and paper scraps flutter in 3D — they foreshorten and flip to their darker back side — side-slip like real falling leaves and settle on the ground. Snow has bokeh flakes up close and crisp crystals far away, and drifts pile up and melt. Every item casts a soft shadow on the page that sharpens as it gets closer; fireflies cast a warm glow instead and blink in near-sync. Gusts sweep across, and your cursor is wind.
Installation
- 1.Download fireflies.zip and unzip it.
- 2.Copy the
.tsxfile intocomponents/pickui/(Tailwind CSS required). - 3.Follow the README inside for usage.
Under the hood
The details that make it feel right, and that a one-line prompt usually misses:
- 01Shadows offset & blur with each item's height above the page plane.
- 02Depth layers: near items are bigger, blurrier and faster (parallax).
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| style | "fireflies" | "snow" | "paper" | "leaves" | "fireflies" | What drifts. |
| count | number | — | Items (default depends on style). |
| wind | number | 0.3 | Steady wind, -1…1. |
| colors | string[] | — | Palette override. |
| interactive | boolean | true | Cursor pushes items. |
| ground | boolean | true | Items land and settle. |
| fullscreen | boolean | false | Whole page instead of the parent box. |
| animated | boolean | true | false = the calm “Regular” version (no idle or ambient motion). |
Accessibility
- Decorative layers are aria-hidden and never block clicks.
- prefers-reduced-motion: frozen or disabled.