Skip to Content
Prism UI
Getting Started

Installation

Install Prism's five library packages and the prismrepo CLI from npm.

Prism ships as six public npm packages under the @prismrepo scope.

Install the library packages

npm install @prismrepo/core @prismrepo/forms @prismrepo/react @prismrepo/adapter-rhf @prismrepo/adapter-zod
PackagePurpose
@prismrepo/coreFramework-independent, React-free contracts. No runtime dependencies.
@prismrepo/formsThe registry and form-builder contracts: defineRegistry, createFormBuilder.
@prismrepo/reactOptional React integration: PrismProvider, usePrismRegistry.
@prismrepo/adapter-rhfBinds Prism's form contracts to React Hook Form: usePrismForm, PrismField.
@prismrepo/adapter-zodAdapts a Zod schema into the resolver usePrismForm accepts: createZodResolver.

You also need React Hook Form and Zod themselves, Prism adapts them, it doesn't bundle them:

npm install react-hook-form zod

Install the CLI

The prismrepo CLI (npm package @prismrepo/cli) is a devDependency-only, install-time tool. It copies Prism's Layer 1 primitives and Layer 2 field components directly into your project, it never becomes a runtime dependency of your application.

npm install -D @prismrepo/cli

Run it without installing first, using npm exec:

npm exec --package @prismrepo/cli -- prismrepo init

Or, once added as a devDependency, run the prismrepo command directly:

npx prismrepo init

See Requirements for supported React, Node, and TypeScript versions, and Quick Start to build your first form.

On this page