Reference
API reference for the takumi-js package and its seven entrypoints.
Takumi ships as one npm package with seven entrypoints. Pick the subpath that matches your runtime and use case.
| Subpath | Purpose | Page |
|---|---|---|
takumi-js | Runtime-detecting render() plus shared types. | Core |
takumi-js/response | Response-compatible class for API routes (drop-in for next/og). | Response |
takumi-js/node | Native Renderer class for Node.js. | Node |
takumi-js/wasm | WASM Renderer for edge runtimes and browsers. | WASM |
takumi-js/helpers | Node builders, unit helpers, and resource fetchers. | Helpers |
takumi-js/helpers/jsx | fromJsx — turn a React tree into Takumi nodes outside the renderer. | Helpers / JSX |
takumi-js/helpers/emoji | extractEmojis — replace emoji glyphs with provider-hosted SVGs. | Helpers / Emoji |
Four cross-cutting pages cover surfaces that live outside any single entrypoint:
Core
render() and the universal entrypoint.
Response
ImageResponse and createImageResponse.
Node
Native Renderer for Node.js.
WASM
WASM Renderer for Workers, Vite, and browsers.
Helpers
container, text, image, vw, rgba, fromHtml.
Helpers / JSX
fromJsx and style presets.
Helpers / Emoji
extractEmojis and provider list.
Nodes
Container, Text, and Image node shapes.
Style
Supported CSS property surface.
Output formats
PNG, JPEG, WebP, ICO, GIF, APNG, raw.
Errors
What goes wrong and how to recover.
Using the Rust crate directly? See docs.rs/takumi.
Edit on GitHub
Last updated on