> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/reference/apps/ui.md).

# UI

Appfarm Create's UI designer is a visual tool for structuring and designing the user interface of an app. Simply drag and drop UI components and connect them to data, app flow, and business logic to rapidly compose an interactive interface.

{% hint style="info" %}
**Good to know**

The [UI/UX crash course](https://showroom.appfarm.app/ui-ux-design) in our Showroom contains best practices for UI and UX design, and how to make clean and user-friendly apps.
{% endhint %}

The UI designer consists of four main sections:

1. [UI components](#id-1.-ui-components)
2. [Views](#id-2.-views)
3. [Layout designer](#id-3.-layout-designer)
4. [Component properties](#id-4.-component-properties)

<figure><img src="https://29237295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiLU-xcHu0eLZiTxcmZ%2Fuploads%2FPNuYNMCsH7PEOL5ZQrnJ%2FUntitled%20drawing.png?alt=media&amp;token=25c50a87-ae44-461c-962d-63f975f561de" alt="A screenshot of the UI designer in Appfarm Create"><figcaption><p>The UI designer in Appfarm Create</p></figcaption></figure>

### 1. UI components

The **Components** panel contains the full [library of UI components](https://docs.appfarm.io/library/ui-components.md) that can be added to an app. The panel is pinned by default. You can collapse it, or unpin it with **Unpin panel**. [Shared components](https://docs.appfarm.io/reference/apps/ui/shareable-ui-components.md#share-between-apps) appear in a **Shared Components** category at the bottom of the panel.

To add a component from the library to a view, either:

* Click the component to add it as a child of the selected element in the view tree, or
* Drag and drop the component into either the view tree or the layout designer.

{% content-ref url="/pages/DVcZCFcZHtSRFpCa90eW" %}
[UI components](https://docs.appfarm.io/library/ui-components.md)
{% endcontent-ref %}

To add a [custom UI component](https://docs.appfarm.io/reference/apps/ui/shareable-ui-components.md) to a view:

* Drag and drop the component from the list at the bottom of the Views pane into the view tree.

{% content-ref url="/pages/fAe2ugOoKg6ZasJ2zKqe" %}
[Shareable UI components](https://docs.appfarm.io/reference/apps/ui/shareable-ui-components.md)
{% endcontent-ref %}

### 2. Views

In the Views pane is a list of all the user interfaces, or *views* in the app. There are three types of views in Appfarm Create:

* [View](https://docs.appfarm.io/reference/apps/ui/views.md), a standard page/screen;
* [Dialog](https://docs.appfarm.io/reference/apps/ui/views/dialog.md), a modal window placed over a view often used for user confirmation or data entry;
* [Drawer](https://docs.appfarm.io/reference/apps/ui/views/drawer.md), a persistent element or temporary modal window often used for navigation.

To add a view to an app, click **View**, **Dialog**, or **Drawer** at the top of the **Components** panel. When the Components panel is unpinned, click the plus icon (**Add views and components**) at the top of the Views pane to open the same list.

Views consist of UI components that can be in a tree structure by nesting them inside [Containers](https://docs.appfarm.io/library/ui-components/container.md). Branches of the tree can be expanded and collapsed. Select a component to highlight the preview in the layout designer and show the available properties in the properties pane. Right-click a component in the tree, or use [keyboard shortcuts](https://docs.appfarm.io/reference/appfarm-create/keyboard-shortcuts.md) to perform operations like copy, paste, and delete.

The views, dialogs, and drawers you have recently opened are shown as tabs above the layout designer. Right-click a tab to **Pin** it, **Close** it, **Close other Views**, or **Close Views to the Right**. You can also right-click a view, dialog, or drawer in the Views pane and select **Pin View**. Pinned views are shown first in the row of tabs.

{% content-ref url="/pages/DDA971W2pyqrNhzwxFti" %}
[Views](https://docs.appfarm.io/reference/apps/ui/views.md)
{% endcontent-ref %}

### 3. Layout designer

The selected view, dialog, or drawer is displayed in the layout designer. You can adjust the settings for responsive design and preview the app in different screen sizes.

{% content-ref url="/pages/WHmD17qlRYN2b17FM04d" %}
[Layout designer](https://docs.appfarm.io/reference/apps/ui/layout-designer.md)
{% endcontent-ref %}

### 4. Component properties

The Properties pane displays the available properties for the selected UI component over up to four tabs:

* **Properties**
* **Style**
* **Conditional Style**
* **Motion**

The **Style**, **Conditional Style**, and **Motion** tabs are only shown for components that support them.

{% content-ref url="/pages/i4BDfmpNBG7PuZdhibI0" %}
[Component properties](https://docs.appfarm.io/reference/apps/ui/component-properties.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/reference/apps/ui.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
