Skip to main content

@microsoft/fast-foundation > FoundationElement

FoundationElement class

Defines a foundation element class that: 1. Connects the element to its ComponentPresentation 2. Allows resolving the element template from the instance or ComponentPresentation 3. Allows resolving the element styles from the instance or ComponentPresentation

Signature:
export declare class FoundationElement extends FASTElement 

Properties

PropertyModifiersTypeDescription
$presentationComponentPresentation | nullA property which resolves the ComponentPresentation instance for the current component.
stylesElementStyles | void | nullSets the default styles for the element instance. When undefined, the element will attempt to resolve default styles from the associated presentation or custom element definition.
templateElementViewTemplate | void | nullSets the template of the element instance. When undefined, the element will attempt to resolve the template from the associated presentation or custom element definition.

Methods

MethodModifiersDescription
compose(this, elementDefinition)staticDefines an element registry function with a set of element definition defaults.
connectedCallback()The connected callback for this FASTElement.
stylesChanged()
templateChanged()