CRUDUI

Home > @polyspec/crudui-generator-core > NodeVM

NodeVM interface

One evaluated node of the recursive form grammar.

Signature:

export interface NodeVM 

Properties

Property

Modifiers

Type

Description

attributes?

Record<string, string>

(Optional) Root declared attributes (design.wrapper.attributes), present only when declared.

body

NodeBody

Body slot.

checkbox?

CheckboxVM

(Optional) Standalone checkbox or switcher.

children?

NodeVM[]

(Optional) Child nodes in the body.

className

string

Root class (design.wrapper).

collapsible?

boolean

(Optional) Whether a row body contains child nodes that can be collapsed.

controls?

ControlsVM

(Optional) Row or empty collection controls.

expanded?

boolean

(Optional) Whether a collapsible row is expanded.

header?

NodeHeader

(Optional) Header slot, present only with content.

hidden

boolean

Whether design.show hides the node.

item?

'field' | 'group'

(Optional) Collection item kind.

key?

string

(Optional) Row key (row nodes).

kind

NodeKind

Node kind.

lang?

string

(Optional) Language code (lang-item nodes).

path?

string

(Optional) Data path relative to the form root (field, group, collection and lang nodes).

sticky?

boolean

(Optional) Whether the row header sticks while scrolling.

stickyDepth?

number

(Optional) Number of enclosing sticky row headers.

style?

string

(Optional) Root inline style (design.wrapper).

toggleLabel?

string

(Optional) Accessible label of the row toggle.

widget?

WidgetModel | UnsupportedVM

(Optional) Widget of a field, scalar row or language item.