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.
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.
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.