---
id: fast-foundation.foundationelement.compose
title: FoundationElement.compose() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [FoundationElement](./fast-foundation.foundationelement.md) &gt; [compose](./fast-foundation.foundationelement.compose.md)

## FoundationElement.compose() method

Defines an element registry function with a set of element definition defaults.

<b>Signature:</b>

```typescript
static compose<T extends FoundationElementDefinition = FoundationElementDefinition, K extends Constructable<FoundationElement> = Constructable<FoundationElement>>(this: K, elementDefinition: T): (overrideDefinition?: OverrideFoundationElementDefinition<T>) => FoundationElementRegistry<T, K>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  this | K |  |
|  elementDefinition | T | The definition of the element to create the registry function for. |

<b>Returns:</b>

(overrideDefinition?: [OverrideFoundationElementDefinition](./fast-foundation.overridefoundationelementdefinition.md)<!-- -->&lt;T&gt;) =&gt; FoundationElementRegistry&lt;T, K&gt;
