This is a prerelease version of FAST (3.0.0-rc.1).

@microsoft/fast-element > PartialFASTElementDefinition

PartialFASTElementDefinition interface

Represents metadata configuration for a custom element.

Signature:

export interface PartialFASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>

Properties

Property

Modifiers

Type

Description

attributes?

readonly

(AttributeConfiguration | string)[]

(Optional) The custom attributes of the custom element.

elementOptions?

readonly

ElementDefinitionOptions

(Optional) Options controlling how the custom element is defined with the platform.

lifecycleCallbacks?

readonly

TemplateLifecycleCallbacks

(Optional) Lifecycle callbacks for template events.

name

readonly

string

The name of the custom element.

registry?

readonly

CustomElementRegistry

(Optional) The registry to register this component in by default.

schema?

readonly

Schema

(Optional) The optional schema associated with the custom element definition. Declarative templates assign this automatically during template resolution. Non-declarative callers can provide one for schema-driven extensions.

shadowOptions?

readonly

Partial<ShadowRootOptions> | null

(Optional) Options controlling the creation of the custom element's shadow DOM.

styles?

readonly

ComposableStyles | ComposableStyles[]

(Optional) The styles to associate with the custom element.

template?

readonly

ElementViewTemplate<InstanceType<TType>> | FASTElementTemplateResolver<TType>

(Optional) The template, or template resolver, for the custom element.