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.
@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
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
| Export | Description |
|---|---|
OSForm | Main component — renders full form with schema fetch |
ConversationalRenderer | Low-level conversational mode renderer |
ClassicRenderer | Low-level classic mode renderer |
useFormState | Core state hook — answers, navigation, submission |
useFormSchema | Schema fetching hook |
All types from @osforms/types | FormSchema, FormField, FormTheme, etc. |
Modes overview
Conversational
- One field displayed at a time
- Keyboard navigation (
Enterto advance,Backspaceto go back) - Animated field transitions (framer-motion, bundled as a dependency)
- Auto-advances on selection for
radio,rating, andscalefields (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