Skip to content

Installation

Requirements

CustomForge is a browser-only ESM library and requires an application with ES2022 modules, DOM, Canvas 2D, WebGL, ResizeObserver, native dialog, container queries, and color-mix() support

The supported browser baseline is Chrome and Edge 111+, Firefox 113+, and Safari 16.4+

Node.js 22+ and pnpm 11+ are required only when developing or releasing this repository. The browser package does not declare a Node.js engine requirement for consumers

Install from npm

The current stable package is published under npm's default latest dist-tag

bash
pnpm add customforge
bash
npm install customforge
bash
yarn add customforge

Fabric.js and Three.js are runtime dependencies and are installed automatically

You do not need to install either engine separately

Pin a release

Use an exact version when repeatable builds matter

bash
pnpm add customforge@0.1.0

Import the stylesheet

Import the public stylesheet once from your application entry

ts
import 'customforge/style.css'

The stylesheet contains the core editor and viewer styles as well as the optional Workbench styles

CustomForge selectors are scoped to their own component classes and do not reset global buttons, inputs, or page elements

Choose an entry

Use the complete Workbench

ts
import { createWorkbench } from 'customforge/workbench'
import 'customforge/style.css'

Or use the interface-free core Library

ts
import { createCustomizer } from 'customforge'
import 'customforge/style.css'

Only documented package paths are public

Do not import from internal paths such as customforge/core, customforge/editor, or customforge/viewer

pnpm canvas warning

pnpm may report that the optional native canvas build script was ignored

CustomForge runs in the browser and does not use Node native canvas, so no approval is required for normal browser use

Projects that want to record this choice explicitly can add

json
{
  "pnpm": {
    "ignoredBuiltDependencies": ["canvas"]
  }
}

Server-side rendering

Create CustomForge instances only in the browser after their mount elements exist

For SSR frameworks, place initialization in the framework's client mount lifecycle and call destroy() during unmount

Next step

Continue with Quick Start