Installation
Install
Section titled “Install”WELD requires zod as a peer dependency for runtime validation.
npm install @weldjs/http zodpnpm add @weldjs/http zodyarn add @weldjs/http zodbun add @weldjs/http zodReact — UI components + hooks
Section titled “React — UI components + hooks”Install @weldjs/react for the full component library (Weld.Shell, Weld.Button, Weld.Table, etc.) and the useWeld hook.
npm install @weldjs/react zodimport { Weld, WeldProvider, useWeld } from '@weldjs/react'Requires react >= 18 as a peer dependency.
Framework Adapters (HTTP only)
Section titled “Framework Adapters (HTTP only)”If you only need the HTTP client without the UI components, use the subpath adapters:
import { useWeld } from '@weldjs/http/react'Requires react >= 18 as a peer dependency.
import { useWeld } from '@weldjs/http/vue'Requires vue >= 3.3 as a peer dependency.
import { useWeld } from '@weldjs/http/solid'Requires solid-js >= 1.8 as a peer dependency.
import { toObservable } from '@weldjs/http/angular'Requires rxjs >= 7 as a peer dependency.
Requirements
Section titled “Requirements”| Runtime | Minimum version |
|---|---|
| Node.js | 18+ |
| Bun | 1.0+ |
| Deno | 1.30+ |
| Browser | Any modern browser with fetch and IndexedDB |
TypeScript
Section titled “TypeScript”WELD ships its own types — no @types/ package needed.
Recommended tsconfig.json settings:
{ "compilerOptions": { "strict": true, "moduleResolution": "bundler" }}Quick scaffold
Section titled “Quick scaffold”The fastest way to start is with the scaffold tool:
npm create weld-app@latest my-appcd my-appnpm run devThis sets up a full project with @weldjs/react, Vite, and TypeScript configured.
