Form
Renders the item-driven fields only - the same field engine as Editor without the placement shell, toolbars, or save bars. Use it when you need a plain form without any extra shell.
Usage
import { Form } from "@svar-ui/react-editor";
| Prop | Type | Default | Description |
|---|---|---|---|
values | TValues | {} | Value source, deep-copied into a draft. |
items | IItemConfig[] | [] | Item configuration, same shape as Editor.items. |
css | string | "" | Extra CSS class appended to the form root. |
activeBatch | string | null | null | Shows only items whose batch matches this value. |
focus | boolean | false | Focuses the first enabled input on mount. |
autoSave | boolean | true | Commits validated changes to the draft immediately. |
readonly | boolean | false | Renders all visible items through their read-only renderers. |
children | ReactNode | undefined | Custom content rendered above the generated fields. |
onChange | TChangeHandler | undefined | Fires when an editable field reports a new value. |
onSave | TSaveHandler | undefined | Fires when pending changes pass validation and save. |
onAction | TActionResultHandler | undefined | Fires on section item actions. |
onValidation | TValidationHandler | undefined | Fires when the validation error object changes. |
Form does not use placement, layout, topBar, bottomBar, or hotkeys.
Example
import { Form } from "@svar-ui/react-editor";
<Form items={items} values={values} readonly={true} />