Skip to content

Interface: StructureVariant ​

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

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:277

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


nodes ​

ts
nodes: StructureNode[];

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

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

Released under the MIT License