Installation
Install the Forma packages to build custom form renderers.
Packages
| Package | Description |
|---|---|
@fogpipe/forma-core | Core runtime: types, engines, FEEL evaluation |
@fogpipe/forma-react | React components and hooks for form rendering |
Install
npm install @fogpipe/forma-core @fogpipe/forma-react
Or with other package managers:
# Yarn
yarn add @fogpipe/forma-core @fogpipe/forma-react
# pnpm
pnpm add @fogpipe/forma-core @fogpipe/forma-react
Peer Dependencies
Forma React requires:
- React 18 or later
- React DOM 18 or later
Package Overview
@fogpipe/forma-core
The core package provides:
- Types - TypeScript definitions for Forma specifications
- FEEL Evaluation - Expression parser and evaluator
- Engines - Visibility, required, enabled, validation, and calculation
import type { Forma, FieldDefinition } from "@fogpipe/forma-core";
import { getVisibility, validate, calculate } from "@fogpipe/forma-core";
@fogpipe/forma-react
The React package provides:
- FormRenderer - Component that renders a complete form
- useForma - Hook for custom form implementations
- FormaErrorBoundary - Error boundary for graceful error handling
import {
FormRenderer,
useForma,
FormaErrorBoundary,
} from "@fogpipe/forma-react";
TypeScript Support
Both packages are written in TypeScript and include full type definitions. No additional @types/* packages are required.
import type {
Forma,
FieldDefinition,
ComputedField,
ValidationResult,
} from "@fogpipe/forma-core";
import type {
ComponentMap,
TextComponentProps,
FormRendererHandle,
} from "@fogpipe/forma-react";
Next Steps
- Quick Start - Build your first form
- Component Mapping - Create custom components