@open-form/renderers
v0.1.3
Published
Umbrella package for OpenForm framework renderers - re-exports all renderers from @open-form/renderer-docx, @open-form/renderer-pdf, and @open-form/renderer-text
Maintainers
Readme
OpenForm is documents as code. It lets developers and AI agents define, validate, and render business documents using typed, composable schemas. This eliminates template drift, broken mappings, and brittle glue code — while giving AI systems a reliable document layer they can safely read, reason over, and generate against in production workflows.
Package overview
Umbrella package that re-exports all OpenForm renderers for convenient installation and usage.
- All-in-one - Single package containing all renderers
- Batteries included - support for text, HTML, Markdown, DOCX, PDF
- Type-safe - Full TypeScript support
Installation
npm install @open-form/renderersUsage
Import desired renderer and pass to the render method's renderer configuration. Included renderers are textRenderer, docxRenderer, and pdfRenderer.
import { open } from "@open-form/sdk";
import { textRenderer } from "@open-form/renderers";
const textString = await open
.form({
name: "my-form",
title: "My Form",
// ...
fields: {
name: { type: "string", required: true },
},
layers: {
markdown: {
kind: "inline",
mimeType: "text/markdown",
text: "Hello {{fields.name}}",
},
},
})
.fill({
fields: { name: "Alice" },
})
.render({
renderer: textRenderer, // Plug in renderer
layer: "markdown", // Specify target layer
});
console.log(textString); // => "Hello Alice"Changelog
View the Changelog for updates.
Related packages
@open-form/sdk- OpenForm framework SDK@open-form/renderer-text- Text Renderer@open-form/renderer-docx- DOCX Renderer@open-form/renderer-pdf- PDF Renderer
Contributing
We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines and code of conduct.
License
This project is licensed under the MIT license.
See LICENSE for more information.
