Skip to main content

@microsoft/fast-foundation > ElementDefinitionContext

ElementDefinitionContext interface

The design system context in which an element can be defined.

Signature:
export interface ElementDefinitionContext 

Properties

PropertyTypeDescription
containerContainerThe dependency injection container associated with the design system.
namestringThe name that the element will be defined as.
shadowRootModeShadowRootMode | undefinedThe shadow root mode specified by the design system's configuration.
typeConstructableThe type that will be defined.
willDefinebooleanIndicates whether or not a platform define call will be made in order to define the element.

Methods

MethodDescription
defineElement(definition)Defines the element.
definePresentation(presentation)Defines a presentation for the element.
tagFor(type)Returns the HTML element tag name that the type will be defined as.