Features Overview
The unified <gui-form> component (React <GuiForm>, Angular <gui-form>, Lit <gui-form>, Vue <GuiForm>, Vanilla JS <gui-form>) takes a small set of inputs and produces a fully-rendered, validated, accessible form. How you wire engine knobs depends on which path you take — Programmatic groups them under formConfig, JSON exposes each as a standalone component prop.
This section walks through every feature you can plug in, in increasing order of depth. Each page is self-contained — read what you need, skip the rest.
What <gui-form> accepts
Section titled “What <gui-form> accepts”| Input | Description |
|---|---|
formDef | An array of gui.* shortcuts. See Form Definition API. |
data | The initial form data object. |
formConfig | Engine wiring container: widgetLoaders, itemRenderers, customValidators, dependencies, validateOn, states. |
formSelectors | GSL selectors that decorate widgets by type, tag, or uid. |
localization | i18n translator (e.g. i18next). |
formEvent | Callback for events emitted by widgets. |
formHealth | Callback that reports the live validation status of the form. |
| Input | Description |
|---|---|
formDef | A parsed JSON form definition. See Form Definition API. |
data | The initial form data object. |
customWidgetLoaders | Map of widget type → async loader, merged with the framework defaults. |
itemRenderers | Custom item-renderer map for dropdown, list, etc. |
customValidators | Map of custom validator schemas referenced by validator: { type: 'custom', ... }. |
dependencies | External helpers (e.g. a markdown parser). |
validateOn | When validation runs: 'eager', 'change', 'blur', 'submit'. |
localization | i18n translator (e.g. i18next). |
formEvent | Callback for events emitted by widgets. |
formHealth | Callback that reports the live validation status of the form. |
State declarations ("states": { ... }) live inside the JSON form itself, not as a component prop.
Features
Section titled “Features”- Widget Loaders — register the UI widgets the form can render.
- Item Renderers — supply custom item templates for
dropdown,list, and similar widgets. - Validators — declarative validation rules with localized error messages.
- Middlewares — intercept the store to add logging, persistence, or schema validation.
- Form Events — listen to widget events and react in your application code.
- i18n — wire i18next or any other translator and localize labels, placeholders, validators, and dates.
- String Interpolation — embed live form data, metadata, and expressions directly in widget text props using
{{...}}template slots. - Dependencies — inject third-party helpers (e.g. a markdown parser) at the form level.
- States — declare named conditions and use them to gate fields, override props, and compose behavior.
See also
Section titled “See also”- Extending GolemUI for building your own widgets, item renderers, validators, and middlewares.
- Form Definition API for the full
gui.*andgui.selectorsreference.