---
id: fast-foundation.designsystemregistrationcontext.trydefineelement
title: DesignSystemRegistrationContext.tryDefineElement() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [DesignSystemRegistrationContext](./fast-foundation.designsystemregistrationcontext.md) &gt; [tryDefineElement](./fast-foundation.designsystemregistrationcontext.trydefineelement.md)

## DesignSystemRegistrationContext.tryDefineElement() method

> Warning: This API is now obsolete.
> 
> - Use the signature with the ElementDefinitionParams param type instead
> 

Used to attempt to define a custom element.

<b>Signature:</b>

```typescript
tryDefineElement(name: string, type: Constructable, callback: ElementDefinitionCallback): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  name | string | The name of the element to define. |
|  type | [Constructable](./fast-element.constructable.md) | The type of the constructor to use to define the element. |
|  callback | [ElementDefinitionCallback](./fast-foundation.elementdefinitioncallback.md) | A callback to invoke if definition will happen. |

<b>Returns:</b>

void
