Skip to content

Elements

Within a variant, each element is described by the Element type. This carries the element’s runtime properties — its children, parent, styles, content, and any prop-driven behavior.

type Elements = Record<string, Element>;

Element

PropertyTypeRequiredDescription
childrenstring[] | PropBindingNoChild element names, or a binding to a slot prop
parentstring | nullNoParent element key (null for root)
stylesStylesNoVisual style properties
propConfigurationsPropConfigurationsNoProp values that must hold for this element to appear
instanceOfstring | PropBinding | SubcomponentRefNoComponent name, binding, or subcomponent ref
contentstring | PropBindingNoText content or glyph name, or a binding to a prop

Further Reading