Installation

npm install taffy-layout

Requirements

  • Node.js: Version 18 or higher.
  • Browser: ES Modules, BigInt, JavaScript/WebAssembly BigInt integration, and WebAssembly reference types support.

Browser Usage

Using Taffy in the browser via ES Modules:

<script type="module"> import { loadTaffy, TaffyTree, } from "https://cdn.jsdelivr.net/npm/taffy-layout/dist/index.js"; // 1. Initialize WebAssembly (Required) await loadTaffy(); // 2. Start using Taffy const tree = new TaffyTree(); </script>

Node.js Usage

Using Taffy in a Node.js environment:

import { loadTaffy, TaffyTree } from "taffy-layout"; // 1. Initialize WebAssembly (Required) await loadTaffy(); // 2. Start using Taffy const tree = new TaffyTree();

TypeScript Support

Taffy Layout includes complete TypeScript definitions out of the box. No additional installation (like @types/taffy-layout) is needed. You get full Intellisense for Style, Layout, and TaffyTree.

Next Steps

漏 2026 ByteLand Technology Limited