@oriatheme/runtime-dom
v0.2.1
Published
Client lifecycle and DOM runtime for OriaTheme.
Readme
@oriatheme/runtime-dom
The client-side OriaTheme runtime: atomic CSS-variable application, theme persistence, Bootstrap helpers, system-mode resolution, custom themes, and optional View Transitions.
Install
npm install @oriatheme/runtime-dom @oriatheme/presetsUse
import { oriaPresetThemes } from "@oriatheme/presets";
import { bootstrapTheme, createOriaThemeRuntime } from "@oriatheme/runtime-dom";
bootstrapTheme();
const runtime = createOriaThemeRuntime({
presets: oriaPresetThemes,
defaultThemeId: "oria-default",
});
runtime.start();
runtime.setTheme("oria-ocean");
runtime.setAppearance("dark");Browser APIs are accessed only after start(). Call destroy() when the owned runtime is no longer needed.
