Skip to content

Display Widgets Overview

Display widgets render read-only content. They have no path and don’t write to form data — they just display information. An alert, a markdown block, a custom-rendered summary card are all display widgets.

import { gui } from '@golemui/gui-shared';
import { html } from 'lit';
const formDef = [
gui.displays.alert({ text: 'Some fields need your attention', level: 'warning' }),
gui.displays.display(({ $form }) => html`<h2>Hello, ${$form.name}!</h2>`),
gui.displays.custom('productDescription', { img: 'p.png', description: '### Cool' }),
];
ShortcutDescription
gui.displays.alertA levelled alert (Alert).
gui.displays.displayA render-callback that returns framework markup (Renderer). Programmatic-only.
gui.displays.customPlug in your own display widget (Custom Widgets).

The same widgets expressed in JSON:

{
"form": [
{
"kind": "display",
"type": "alert",
"props": { "text": "Some fields need your attention", "level": "warning" }
}
]
}
PropertyDescription
uidOptional unique id; one is generated if absent.
kindMANDATORY. Always 'display'.
typeMANDATORY. The widget type (alert, markdownText, renderer, etc.).
propsWidget-specific configuration — see each widget’s reference page.