Skip to main content

Requirements

  • react and react-dom 18 or later (peer dependencies)

Install

TypeScript

Types are bundled, so no separate @types package is needed. Import them from @osforms/react:
Also exported: FieldConfig, FieldOption, FieldValidation, FormMode, WelcomeScreen, ThankYouScreen, OSFormProps, FormState, and FormStateActions.

Next.js (App Router)

Works out of the box. Add 'use client' when using in a Server Component file:

Next.js (Pages Router)

No special configuration needed, and no 'use client' directive:

Vite / CRA

Works without additional configuration.

Bundle size