Home > @polyspec/crudui-generator-core > WidgetModel
WidgetModel interface
The fully-evaluated, markup-free description of one leaf widget. A field adapter renders the element tree from THIS — it computes nothing.
Signature:
export interface WidgetModel
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
(Optional) Append affix (content). | |||
|
Main control attributes (lowercase HTML names). Empty for file/cover. | |||
|
(Optional) The structured condition editor, or its named error (layout | |||
|
Record<string, Attrs> |
(Optional) Secondary attrs (image readonly display input, file input, choice option input shared attrs and the declared option attributes | ||
|
string |
(Optional) Per-option label class (choice/multichoice). | ||
|
string |
Resolved field type (registry key). | ||
|
'widget' | 'bare' | 'host-script' | 'choices' | 'file' | 'display' | 'search' | 'range' | 'condition' | 'button' |
Layout family for the adapter (how to wrap the control). | ||
|
(Optional) Static options (select/choice/multichoice/search). | |||
|
(Optional) Prepend affix (content + design.prepend node). | |||
|
string |
(Optional) RAW html for a display widget (dummy/image-viewer) — passes unescaped. | ||
|
string |
(Optional) Inline script chrome text (editors/tagify/search). | ||
|
SourceAttrs | null |
(Optional) Dynamic source stub descriptor (data-source-* attrs), or null when static. | ||
|
string |
(Optional) Inline style chrome text (search hide_searching). | ||
|
'input' | 'select' | 'textarea' | 'div' | 'button' |
(Optional) Main control element name ('input'|'select'|'textarea'|'div'|'button'). | ||
|
string |
(Optional) Textarea/dummy text content, range output text and button content (already display-resolved). |