@gottheflag/nova
v0.1.0-beta.2
Published
Theme state controller.
Readme
Theme controller
A controller for managing the theming for applications.
Installation
pnpm add @gottheflag/novaUsage
import { Controller } from "@gottheflag/nova";
import { Button } from "@gottheflag/nova/adapters";
const ctl = new Controller(document, {
// all configs are optional
storage: { key: "theme" },
attribute: "data-theme",
initial: "dark",
dark: "dark",
light: "light",
system: "system",
});
ctl.use(Button); // use adapters