# ui.root.clear

<br />

Clears the root panel.

<br />

<br />

| Usage | Returns |
|---|---|
| `ui.root.clear()` |   |

**No arguments.**

## Examples

### Code Editor (JavaScript)

```javascript
// Replace the default UI widgets with a few custom widgets.
ui.root.clear();
ui.root.add(ui.Label('This is a custom user interface.'));
```