Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eui.root\u003c/code\u003e object allows you to add and manage widgets within the main user interface panel.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eadd()\u003c/code\u003e method specifically inserts a specified widget into the root panel, modifying the display.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eclear()\u003c/code\u003e method can be used to remove existing widgets, providing flexibility in UI customization.\u003c/p\u003e\n"]]],[],null,["# ui.root.add\n\n\u003cbr /\u003e\n\nAdds a widget to the root panel.\n\n\u003cbr /\u003e\n\nReturns the root panel.\n\n| Usage | Returns |\n|-----------------------|----------|\n| `ui.root.add(widget)` | ui.Panel |\n\n| Argument | Type | Details |\n|----------|-----------|-------------------------|\n| `widget` | ui.Widget | The widget to be added. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Replace the default UI widgets with a few custom widgets.\nui.root.clear();\nui.root.add(\n ui.Panel({\n widgets:[\n ui.Label('This is a custom user interface.'),\n ],\n style: {border: '5px solid green'}\n })\n);\nui.root.add(ui.Map());\n```"]]