Requirements
reactandreact-dom18 or later (peer dependencies)
Install
TypeScript
Types are bundled, so no separate@types package is needed. Import them from @osforms/react:
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: