React
Client mount
Use OzzyRMDocs or the framework-agnostic mount() API.
Use these APIs when catalog loading happens outside the docs component (loaders, route handlers, build scripts, or your own server code).
OzzyRMDocs (React)
"use client";
import { OzzyRMDocs } from "ozzyrm/react";
export function Docs({ catalog, defaultSchemaId }) {
return (
<OzzyRMDocs
catalog={catalog}
defaultSchemaId={defaultSchemaId}
/>
);
}OzzyRMDocs mounts into a host DOM node and injects styles automatically.
mount() (any React host)
import { mount } from "ozzyrm/ui";
import { loadCatalog } from "ozzyrm";
import config from "./ozzyrm.config";
const { catalog, defaultSchemaId } = await loadCatalog(config);
const el = document.getElementById("ozzyrm-root")!;
const handle = mount(el, {
catalog,
defaultSchemaId,
});
// later
handle.update({ catalog: nextCatalog });
handle.unmount();Loading the catalog yourself
import { loadCatalog } from "ozzyrm";
import config from "./ozzyrm.config";
const { catalog, defaultSchemaId } = await loadCatalog(config, {
cwd: process.cwd(),
});loadCatalog resolves adapters, unified merges, and scenarios. Validation failures throw UnifiedSchemaValidationError with stable diagnostic codes.
Glossary links
Type and attribute badges open docs pages on ozzyrm.vercel.app in a new tab. The origin is hardcoded in the package.
Next
- Server helper when the host can import config on the server
- Watch & HMR