@0rbt/theme
v0.1.0-beta.2
Published
Theme state controller.
Readme
Theme controller
A controller for managing the theming for applications.
Installation
pnpm add @0rbt/themeUsage
import { Controller } from "@0rbt/theme";
import { Button } from "@0rbt/theme/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