Render a schema to a semantic HTML string.
Framework-agnostic alternative to the React rendering pipeline. Shares the same normalise → walk → render pipeline, but emits escaped HTML with sc- prefixed classes rather than ReactNodes. Pass resolver to plug in a custom HTML renderer.
sc-
resolver
Zod schema, JSON Schema, or OpenAPI document
Value, overrides, and resolver options
Semantic HTML string with sc- prefixed classes
import { renderToHtml } from "schema-components/html/renderToHtml";const html = renderToHtml(userSchema, { value: user, readOnly: true }); Copy
import { renderToHtml } from "schema-components/html/renderToHtml";const html = renderToHtml(userSchema, { value: user, readOnly: true });
Render a schema to a semantic HTML string.
Framework-agnostic alternative to the React rendering pipeline. Shares the same normalise → walk → render pipeline, but emits escaped HTML with
sc-prefixed classes rather than ReactNodes. Passresolverto plug in a custom HTML renderer.