For application developers
Application-defined presets
Register complete, valid ThemeDefinitions in application code; do not present them as the official catalog or bypass Core validation.Create a complete definition and validate it first
ts
import { createThemeFromSeed, validateTheme, oriaStandardContract } from "@oriatheme/core";
const brandTheme = createThemeFromSeed(
{ color: "#2563eb" },
{ id: "acme-blue", name: "Acme Blue" },
);
const result = validateTheme(brandTheme, oriaStandardContract);
if (!result.ok) throw new Error("Theme definition is invalid");A production application should validate a complete ThemeDefinition during build or controlled initialization. Do not compile CSS from untrusted JSON; route user input through Core import and validation APIs.
Pass it to the runtime with official presets
ts
import { oriaPresetThemes } from "@oriatheme/presets";
import { createOriaThemeRuntime } from "@oriatheme/runtime-dom";
const runtime = createOriaThemeRuntime({
presets: [...oriaPresetThemes, brandTheme],
defaultThemeId: "acme-blue",
});This is not the official preset catalog
The catalog in @oriatheme/presets is maintained by OriaTheme’s release process. Application presets belong only to an app’s own configuration: they cannot override official IDs or bypass Core validation, resolution, or runtime atomic application.
Back to package selection