Skip to content

Interface: StructureVariant

Defined in: packages/core/src/model.ts:268

One alternative DOM shape for a component, from a top-level @variant <name>? { … } block inside @structure — only present when the author needs to say "pick one of these" (e.g. a <label> wrapping a control vs. a <label for> + a sibling control), as opposed to StructureNode's default of "these roots all coexist".

Properties

name?

ts
optional name?: string;

Defined in: packages/core/src/model.ts:270

The author-supplied name from @variant <name>, when given (bare @variant omits it).


nodes

ts
nodes: StructureNode[];

Defined in: packages/core/src/model.ts:272

This variant's root nodes, parsed the same way a plain @structure body is.

Released under the MIT License