# ui.root.remove

<br />

Removes the given widget from the root panel, if it exists.

<br />

Returns the removed widget or null if the widget was not present in the root panel.

| Usage | Returns |
|---|---|
| `ui.root.remove(widget)` | Object |

| Argument | Type | Details |
|---|---|---|
| `widget` | ui.Widget | The widget to remove. |