Skip to main content
@osforms/react is the official React SDK for OSForms. It renders forms designed in the dashboard’s Builder tab, or forms you define locally, in two modes:
  • Conversational: one field at a time, Typeform-style, with animated transitions
  • Classic: all fields on one page, standard form layout

Installation

Basic usage

formId is the form’s slug. The schema is fetched from https://osforms.com/api/v1/f/{formId}/schema.
The form needs a schema saved in the Builder tab. For a form without one, the schema endpoint returns schema: null and OSForm renders nothing.

Local schema

Pass a schema directly. No schema fetch is needed:

What’s included

Modes overview

Conversational

  • One field displayed at a time
  • Enter to advance (Cmd/Ctrl+Enter in a textarea); ↑/↓ buttons to move back and forward
  • Animated field transitions (framer-motion, installed as a dependency)
  • Auto-advances on selection for radio, select, rating, and scale fields

Classic

  • All visible fields on one page
  • Standard form layout
  • Submit button at the bottom
  • Inline error under each invalid field
Both modes support welcome and thank-you screens. A stepped mode exists in the types but currently renders the conversational layout.