Preset · Spring season

Spring preset

The built-in Spring preset composes Petals with restrained Sparkles. Its typed factory can tune or remove each layer without an untyped universal options bag.

Composition

Soft drifting petals and fresh, low-density color accents.

React usage

Decoration.tsx
import { Zeenat } from "zeenat";

export function Decoration() {
  return <Zeenat preset="spring" intensity="medium" />;
}

Next.js App Router

app/layout.tsx
import { Zeenat } from "zeenat";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return <html><body><Zeenat preset="spring" />{children}</body></html>;
}

Vanilla JavaScript

main.ts
import { zeenat } from "zeenat/vanilla";

const decoration = zeenat({ preset: "spring", intensity: "medium" });
// Later: decoration.destroy();

Typed customization

The Spring subpath exports createSpringPreset. Its supported options are listed below.

TSX
import { Zeenat } from "zeenat";
import { createSpringPreset } from "zeenat/presets/spring";

const customized = createSpringPreset({
  petals: false,
});

<Zeenat preset={customized} />;
PropertyTypeDefaultDescription
petalsPetalsOptions | falsebuilt-in petal configOverride Petals options or disable petals.
accentsSparklesOptions | falsebuilt-in fresh accentsOverride Sparkles options or disable accents.

Intensity and seed

Scene intensity scales effect counts without changing the preset API. A seed makes generated positions and timing deterministic across restarts.

TSX
<Zeenat preset="spring" intensity="low" seed={2026} />

Reduced motion

A sparse static arrangement of petals and accents remains.

Accessibility and reduced motion

Scheduling

Keep dates out of preset definitions. Schedule the scene at the call site with explicit time-zone offsets. Set the year and local offset for your event.

TSX
<Zeenat
  preset="spring"
  activeFrom="2026-12-01T00:00:00Z"
  activeUntil="2027-01-01T00:00:00Z"
/>