formId | string | — | Form slug from your dashboard. Fetches the schema automatically. |
schema | FormSchema | — | Pass a schema directly instead of fetching it. |
endpoint | string | {baseUrl}/api/v1/f/{formId} | Submission URL. Required when using schema without formId. |
baseUrl | string | https://osforms.com | Override for self-hosted instances. |
mode | 'conversational' | 'classic' | 'stepped' | schema’s mode, else 'conversational' | Override the render mode. stepped currently renders conversational. |
theme | Partial<FormTheme> | — | Theme overrides. See merging below. |
fullScreen | boolean | false | Renders the form fixed to the full viewport (position: fixed). |
onComplete | () => void | — | Called when the form is successfully submitted. |
onError | (error: Error) => void | — | Called when a submission fails. error.message is the server’s error, e.g. "Monthly submission limit reached. Resets on the 1st." |
loadingComponent | ReactNode | — | Custom loading state while the schema is fetched. |
errorComponent | ReactNode | — | Custom error state if the schema fetch fails. |