AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
API overview
Core exports — createVelloRoot, Canvas, Rect, and Text.
This page covers the main public surface from react-vello. Types live in the package; the shapes below match the published TypeScript definitions.
createVelloRoot
Mount a React Vello tree on an existing <canvas>.
function createVelloRoot(
canvas: HTMLCanvasElement,
options?: RendererOptions
): VelloRoot;RendererOptions
| Option | Type | Description |
|---|---|---|
onReady | (context: CanvasContext) => void | Called when the renderer is ready (GPU or fallback). |
onFrame | (ops: Uint8Array) => void | Encoded frame buffer; valid only for the duration of the call. |
onError | (error: unknown) => void | WebGPU / WASM init failure. |