Effect · ambient layer

Snow effect

The Zeenat snow effect adds bounded animated snowfall to a website using Zeenat's framework-neutral effect engine. It can be imported individually or used as part of the built-in Winter 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 { snow } from "zeenat/effects";
// or
import { snow } from "zeenat/effects/snow";

Basic usage

Snowfall.tsx
import { ZeenatScene } from "zeenat";
import { snow } from "zeenat/effects/snow";

const effects = [snow()];

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

snow() options

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

PropertyTypeRequiredDefaultDescription
colorsreadonly string[]No["#ffffff", "#dbeafe"]CSS colors used for snowflakes.
countnumberNo34Base flake count before density scaling; the effect keeps a small minimum.
sizereadonly [number, number]No[3, 8]Minimum and maximum flake diameter in CSS pixels.
opacitynumberNo0.72Maximum flake opacity.
speed"slow" | "medium" | "fast"No"medium"Fall-duration range: slow 13–20s, medium 9–15s, fast 6–10s.
driftnumberNo34Horizontal travel in CSS pixels.
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
snow({ count: 14, speed: "slow", drift: 20, opacity: 0.48 })

Intense

Intense
snow({ count: 58, speed: "fast", size: [3, 10], drift: 52 })

Combined

Combined
const effects = [
  snow({ count: 26 }),
  stringLights({ colors: ["#fef3c7", "#bfdbfe"] }),
];

Reduced motion

The shared falling-element renderer keeps a sparse, static distribution instead of animating flakes across the viewport.

Read the complete reduced-motion contract

Performance notes

Counts are bounded and scaled for intensity and small screens. Flakes animate with transform and opacity; visibility changes pause the scene scheduler.

Zeenat performance architecture