JoyDoc
Main form builder component for creating and editing JoyDoc forms. Kind: React ComponentReturns:
JSX.Element - The JoyDoc component
Props
| Param | Type | Default | Description |
|---|---|---|---|
| doc | Object | The JoyDoc document object containing form structure and data | |
| mode | string | 'edit' | Display mode: ‘edit’, ‘view’, or ‘preview’ |
| view | string | 'desktop' | View type: ‘desktop’, ‘mobile’, or ‘tablet’ |
| theme | Object | Custom theme object for styling | |
| width | number | 816 | Component width in pixels |
| height | number | 1056 | Component height in pixels |
| initialPageId | string | ID of the initially active page | |
| lazyload | boolean | false | Enable lazy loading for performance |
| features | Object | Feature flags object | |
| features.formulas | boolean | false | Enable formula support |
| features.readableIds | boolean | false | Use readable IDs instead of object IDs |
| features.repeatingHeaderAndFooter | boolean | false | Enable repeating headers/footers |
| features.validateSchema | boolean | false | Enable schema validation |
| fieldOptions | Array | Custom field options array | |
| fieldSettings | Object | Custom settings for different targets (page, field, table column) | |
| identifiers | Object | Identifier configuration | |
| onChange | function | Callback fired when document changes | |
| onCaptureAsync | function | Async callback for field capture | |
| onUploadAsync | function | Async callback for file uploads | |
| onError | function | Error handler callback | |
| onFocus | function | Field focus handler | |
| onBlur | function | Field blur handler | |
| validateSchema | boolean | false | Enable schema validation |
Example
Features Configuration
Thefeatures prop allows you to enable/disable various functionalities:
Event Handlers
File Upload Handling
JoyDocExporter
PDF export component for rendering JoyDoc forms as PDF-ready layouts. Kind: React ComponentReturns:
JSX.Element - The JoyDocExporter component
Props
| Param | Type | Default | Description |
|---|---|---|---|
| doc | Object | The JoyDoc document to export | |
| theme | Object | Custom theme object for styling | |
| license | string | JWT license key for validation | |
| config | Object | Export configuration | |
| config.page | Object | Page configuration | |
| config.page.height | number | 1056 | Page height in pixels |
| config.page.width | number | 816 | Page width in pixels |
| config.page.padding | number | 0 | Page padding in pixels |