Integration

Using Zeenat.js without React

Use the framework-neutral Zeenat.js browser controller from vanilla JavaScript or TypeScript.

Create a decoration

Call zeenat() in a browser. By default the engine mounts under document.body; provide mount to place the root under another element.

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

const decoration = zeenat({
  preset: "us-independence-day",
  intensity: "medium",
});

Control and destroy it

The controller supports pause, resume, restart, setIntensity and idempotent destroy. Always destroy long-lived page decorations when the hosting view is removed.

main.ts
decoration.pause();
decoration.resume();
decoration.setIntensity("low");
decoration.restart();
decoration.destroy();

Importing during SSR

Importing zeenat/vanilla on the server is safe. Calling zeenat() without a browser document throws a clear error, so invoke it only after the client mounts.