OzzyRMOzzyRMDocs
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)

TSX
"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)

TypeScript
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

TypeScript
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.

Type and attribute badges open docs pages on ozzyrm.vercel.app in a new tab. The origin is hardcoded in the package.

Next

On this page