Build beautiful, print-ready datasheets and PDFs from React templates.
@flanksource/facet is a framework for creating professional datasheets, reports, and documentation using React components. It provides a rich component library optimized for print and browser rendering, along with a CLI for building HTML, PDF, PNG, editable Word documents (DOCX), and PowerPoint presentations (PPTX).
Features
📄 Print-optimized components - 47+ components designed for professional datasheets
🎨 React & TypeScript - Full type safety and modern React patterns
🔧 Zero-config CLI - Build HTML, PDF, PNG, DOCX, and PPTX with a single command
🔗 Component imports - import { StatCard } from '@flanksource/facet'
⚡ Fast builds - Powered by Vite with smart caching
📦 Shared runtimes - installed toolchain and dependency caches outside your projects
🔀 Live diagrams - Box-and-arrow diagrams baked to static SVG via // @live
This installs the facet command, which runs on Node.js (>=24), and a matching platform runtime containing precompiled libraries and the rendering toolchain. Default rendering needs no pnpm or registry access after installation. New custom dependency sets require pnpm once, then reuse a shared cache. PDF, PNG, DOCX and PPTX also need system Chrome/Chromium; archive extraction requires tar. Run facet doctor to check the environment. For a Node-free installation, use the standalone binary below.
Both commands accept the shared render flags, data loaders, JSON Schema validation, classification policies, remote templates, and --facet-url. They require Chrome/Chromium locally; a remote Facet server supplies the browser when FACET_URL is set. generateDOCX(options) and generatePPTX(options) are also exported from @flanksource/facet/cli. The render API accepts format: "docx" or format: "pptx" and returns the usual result URL.