Skip to main content

Documentation Index

Fetch the complete documentation index at: https://osforms.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Requirements

  • React 18 or later

Install

npm install @osforms/react

TypeScript

Types are bundled — no separate @types package needed. All types from @osforms/types are re-exported from @osforms/react:
import type {
  FormSchema,
  FormField,
  FormTheme,
  FieldType,
  ConditionalLogic,
} from '@osforms/react';

Next.js (App Router)

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

import { OSForm } from '@osforms/react';

export default function ContactPage() {
  return <OSForm formId="abc123" mode="conversational" fullScreen />;
}

Next.js (Pages Router)

No special configuration needed — all files in pages/ are client-side by default:
import { OSForm } from '@osforms/react';

export default function ContactPage() {
  return <OSForm formId="abc123" />;
}

Vite / CRA

Works without additional configuration.

Bundle size

WhatSize
@osforms/react (gzipped)~25 kB
framer-motion (gzipped, auto-installed)~40 kB