Glossary
Key terms and concepts used throughout the docxio documentation.
| Term | Definition |
|---|---|
| Backend | The WASM build used for rendering. "minimal" (~600KB, browser-optimized, XML generation only) or "full" (~1.2MB, includes ZIP compression, parser, template engine, and validator). |
| DocumentNode | The JSX tree node type produced by evaluating docxio JSX. Has type, props, and children fields. Passed to render() to generate a .docx file. |
| DocumentTree | Alias for DocumentNode with type="document". The root of the JSX tree. |
| EMU | English Metric Unit. The base unit for image dimensions in OOXML. 914,400 EMU = 1 inch. Use widthPt/heightPt props for point-based convenience. |
| Half-point | Unit for font sizes in OOXML. 1 half-point = 0.5pt, so fontSize={24} means 12pt. |
| Intrinsic element | A lowercase JSX tag name (e.g., <paragraph>, <run>) that maps directly to an OOXML construct, as opposed to a user-defined component function. |
| OOXML | Office Open XML (ISO/IEC 29500). The XML-based file format behind .docx, .xlsx, and .pptx files. A .docx is a ZIP archive containing XML parts. |
| Paragraph | OOXML's block-level text unit (w:p). Contains runs and other inline elements. In docxio: <paragraph>. |
| ParsedTemplate | Object returned by loadTemplate(). Contains the raw .docx bytes and a list of detected {{slot}} names. |
| Run | OOXML's inline text unit (w:r). A contiguous span of text sharing the same character formatting. In docxio: <run>. |
| Section | A page layout unit (w:sectPr) that defines margins, orientation, page size, columns, and headers/footers. Each <section> can have different layout settings. |
| Slot | A placeholder in a template document. Text slots use {{name}} syntax in the .docx content. Structured slots use the <Slot name="..."> JSX component inside <Template>. |
| SlotValue | The type of a template slot value: either a string (simple text replacement) or a DocumentNode (structured JSX content). |
| Theme | A TypeScript object implementing the Theme interface that provides consistent colors, fonts, and spacing across all document elements. |
| Transformer | The internal module (transformer.ts) that converts the JSX DocumentNode tree into a Rust-compatible structure for the WASM boundary. |
| Twip | "Twentieth of a point" -- the base unit for dimensions in OOXML. 1 twip = 1/20 point = 1/1440 inch. Example: 720 twips = 0.5 inch. |
| Validation | docxio validates the document tree before rendering. Warnings are logged; in strict mode, errors throw. |
| WASM | WebAssembly. The Rust crates compile to WASM, which runs in browsers and server runtimes. docxio auto-initializes the WASM module on first render. |