# Pages and Widgets Panel

## 🧱 Page Selection & Widget Tree

This panel gives you full control over your app’s pages and UI structure. It’s divided into two main sections — **Page Selector** and **Widget Tree** — which help you manage and build your app's interface efficiently.

***

### 📄 Page Selector

At the top, you’ll see the **currently selected page name** (e.g., `HomePage`) with a dropdown indicator.

#### Features:

* **Clicking the page name** opens a dropdown to view and switch between different pages and components.
* **➕ Plus button** on the top right:
  * Add a new page
  * Add a reusable component
* Helps you organize your app’s structure by grouping screens and reusable UI elements.

***

### 🌲 Widget Tree

Below the page selector is the **Widget Tree**, a visual hierarchy of all the widgets present on the selected page.

#### Features:

* Displays the **structure of the UI** in a tree format.
* Each widget (e.g., `image1`, `text1`, `button1`) is shown as a node under parent widgets (e.g., `column1`, `body`, `HomePage`).
* Sections like `appBar`, `body`, and `bottomNavigationBar` are automatically detected where applicable.

#### What You Can Do:

* **Add Widgets**: Click the ➕ icon beside any widget to add a child widget inside it.
* **Reorder Widgets**: Drag and drop widgets to reorganize layout or nesting.
* **Edit Widget Names**: Rename widgets for better readability and maintenance.
* **Right-click Options**:
  * Delete
  * Copy / Paste
  * Duplicate
  * Wrap with container or column
  * Move up/down

> 📝 Tip: Use the **search** icon to quickly locate widgets in large trees, and the **sort** icon to organize or collapse sections.

***

This panel is your central workspace for defining and managing how your app looks and behaves.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digia.tech/studio-workspace/builder-tool/pages-and-widgets-panel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
