# RemoveComponent<T>()

> Removes the attached component of type T.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public void RemoveComponent<T>() where T : struct, IVisualElementComponent
```
