Skip to content

@leafer/node

Full package, includes @leafer-ui/node and all @leafer-in/* plugin packages (excluding text editor and HTML plugins).

web version     worker version     node version     mini program version

Runs in a server-side Node environment. It can be used for backend rendering, image generation, and automated testing, and can simulate user interactions.

Installation

Runs in a server-side environment.

sh
npm install @leafer/node
sh
pnpm add @leafer/node
sh
yarn add @leafer/node
sh
bun add @leafer/node

If you need interactive features, please use leafer-ui.

skia  |  napi

@napi-rs/canvas is used in server environments to replace Canvas functionality. It is also based on Skia, but wrapped with Rust, offering high performance and zero system dependencies. It must be installed separately.

sh
npm install @napi-rs/canvas
sh
pnpm add @napi-rs/canvas
sh
yarn add @napi-rs/canvas
sh
bun add @napi-rs/canvas

Update

Learn how to quickly update versions.

Usage

The usage, global variables, and @leafer-ui/node are consistent. You only need to change the package name to run the official example code.

Released under the MIT License.