Skip to main content
@osforms/react is the official React SDK for osforms. It renders forms fetched from the osforms API — 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

The formId prop fetches the form schema automatically from https://osforms.com/api/v1/f/{formId}/schema.

Headless usage

Pass a schema directly — no API fetch required:

What’s included

Modes overview

Conversational

  • One field displayed at a time
  • Keyboard navigation (Enter to advance, Backspace to go back)
  • Animated field transitions (framer-motion, bundled as a dependency)
  • Auto-advances on selection for radio, rating, and scale fields (configurable)
  • Welcome and thank-you screens supported

Classic

  • All visible fields on one page
  • Standard form layout
  • Submit button at the bottom
  • Scrolls to first error on validation failure