Skip to content

Installation

Veyrajs ships as scoped packages under @veyrajs/*. The engine (@veyrajs/core) stands alone; each framework adapter is a thin, optional package on top of it.

@veyrajs/core has zero runtime dependencies — use it imperatively in any project (vanilla TS, a Web Component, a Worker-driven canvas, or a framework you wire up yourself).

Terminal window
npm install @veyrajs/core

Install the adapter for your framework alongside the core. The framework itself is a peer dependency — you provide it; the adapter never bundles its own copy.

Adapter Package Peer dependency
React @veyrajs/react react >= 18, react-dom >= 18
Vue 3 @veyrajs/vue vue ^3.4
Svelte 5 @veyrajs/svelte svelte ^5
Angular 18 @veyrajs/angular @angular/core ^18, @angular/common ^18

For example, the React adapter:

Terminal window
npm install @veyrajs/core @veyrajs/react

You only ever install one adapter — they are parallel siblings, never combined.

Everything is a named export; there is no default export and no side-effecting global.

// Engine
import { Stage, Layer, Rect, Circle, History, SelectionController } from '@veyrajs/core'
// React adapter
import { ACStage, ACLayer, ACRect } from '@veyrajs/react'

The packages are ESM-only and ship their own .d.ts types — no @types/* package required.

No configuration is needed beyond a modern moduleResolution. Veyrajs is authored in strict TypeScript and every public symbol is fully typed (config objects, events, commands, serialized nodes). Recommended tsconfig.json essentials:

{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler", // or "NodeNext"
"strict": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"]
}
}
  • Node.js ≥ 20 for tooling/SSR; the engine itself runs in any modern browser.
  • A browser with Canvas 2D and Pointer Events (every evergreen browser).
  • pnpm 10 only if you work inside the Veyrajs monorepo (via Corepack: corepack enable).

Next: build your first scene →