2 phút đọc
kane50613/takumi: Render OG images and paged PDFs from JSX, HTML, and CSS. No headless browser. Runs on Node – Repository kane50613/takumi. Mô tả: Render OG images and paged PDFs from JSX, HTML, and CSS. No headless browser. Runs on Node.js, Cloudflare Workers, browsers, and Rust.. 2986 stars, 71 forks, ngôn ngữ chính Rust, cập nhật 2026-09-14.
1. Repository làm gì?
Generate OG images and PDF documents from JSX, HTML, and CSS. No headless browser required.
Documentation · Playground · Showcase
Use takumi-js for images and animations, or takumi-pdf for PDF documents. The examples below use Bun to run JSX directly.
Save this as image.tsx and run bun image.tsx to write a 1200 × 630 PNG.
Save this as document.tsx and run bun document.tsx to write an A4 PDF with a page-number footer.
Takumi is a Rust rendering engine for markup and CSS. It handles layout, text shaping, compositing, and encoding without launching a browser. One component tree renders as an image, an animation, or a paged PDF.
2. Dữ liệu và cấu trúc đáng chú ý
Rendering many images? Register the fonts once on a Renderer and reuse it. See Typography & Fonts.
Compare Takumi and Satori for image formats, CSS support, runtime requirements, and migration examples. For PDFs, the renderer comparison records invoice benchmarks against @react-pdf/renderer and Puppeteer, with package versions and hardware.
Takumi supports a subset of browser CSS. PDF output rejects filter: blur(), drop-shadow(), and backdrop-filter. Keep Puppeteer when your output depends on page scripts or browser layout. Test your templates before switching renderers.
More projects in the showcase. Takumi is part of the Vercel OSS Program.
Takumi converts templates to a node tree, computes layout with Taffy, shapes text with Parley and Skrifa, and sends the layout to a raster, SVG, or PDF backend. See the node reference for the input format.
See more examples for invoices, e-invoices, Next.js, Cloudflare Workers, TanStack Start, Svelte, Rust, and ffmpeg keyframe animation.
Read CONTRIBUTING.md for local setup and the fixture workflow.
3. Khả năng ứng dụng và giới hạn
We welcome bug reports, feature requests, doc improvements, and new example integrations.
Số liệu repository có thể thay đổi; nên mở liên kết nguồn để kiểm tra README, giấy phép và trạng thái phát hành.
Nguồn tham khảo: Xem bài gốc