# FindRootPanelComponent(VisualElement)

> Finds the root IPanelComponent for the given VisualElement.

## Definition

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

```csharp
public static IPanelComponent FindRootPanelComponent(this VisualElement element)
```

### Parameters

**** (\[VisualElement]\(/engine/6000.6/script-reference/unityengine/uielements/visualelement)): The element to start the search from.

### Returns

| Type                                                                                         | Description                                         |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [IPanelComponent](/engine/6000.6/script-reference/unityengine/uielements/ipanelcomponent.md) | The root IPanelComponent, or null if none is found. |
