Effect · ambient layer

Falling Leaves effect

The Zeenat falling leaves effect adds an autumnal layer of bounded leaf forms with simple vein detail. It can be used alone or through the built-in Autumn preset.

Installation and imports

Install Zeenat once, then use the aggregate effects entry or the smallest explicit subpath. Both paths are exported by package version 0.3.0.

Install
npm install zeenat
Imports
import { fallingLeaves } from "zeenat/effects";
// or
import { fallingLeaves } from "zeenat/effects/falling-leaves";

Basic usage

AutumnLeaves.tsx
import { ZeenatScene } from "zeenat";
import { fallingLeaves } from "zeenat/effects/falling-leaves";

const effects = [fallingLeaves()];

export function Decoration() {
  return <ZeenatScene effects={effects} />;
}

fallingLeaves() options

Properties marked required have no factory default. Every other value below is taken from the current TypeScript source.

PropertyTypeRequiredDefaultDescription
colorsreadonly string[]No["#b45309", "#d97706", "#92400e", "#a16207"]CSS colors used for leaves.
countnumberNo20Base leaf count before density scaling.
opacitynumberNo0.7Maximum leaf opacity.
sizereadonly [number, number]No[10, 19]Minimum and maximum leaf size in CSS pixels.
driftnumberNo72Horizontal travel in CSS pixels.
rotationnumberNo720Maximum rotation per fall cycle in degrees.
fallSpeednumberNo1Duration multiplier; values below 1 fall faster, clamped to at least 0.2.
layer"background" | "ambient" | "foreground" | "top"No"ambient"Semantic layer used to order the effect inside the Zeenat scene.
ordernumberNoOptional ordering value among effects in the same semantic layer.

Examples

Subtle

Subtle
fallingLeaves({ count: 9, opacity: 0.45, drift: 32, fallSpeed: 1.3 })

Intense

Intense
fallingLeaves({ count: 36, size: [11, 22], rotation: 960, fallSpeed: 0.75 })

Combined

Combined
const effects = [fallingLeaves(), sparkles({ colors: ["#f59e0b", "#fcd34d"], count: 8 })];

Reduced motion

A low-density static leaf composition remains visible without falling or spinning.

Read the complete reduced-motion contract

Performance notes

Leaf counts are bounded and the shared renderer uses transforms, opacity and responsive density scaling.

Zeenat performance architecture