> 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/library/action-nodes/open-and-close-popover.md).

# Open/close popover

## Open popover

The **Open Popover** Action Node is used to open a specific Popover defined in your User Interface. The Popover UI Component must be placed inside the same View/Dialog where the action containing Open Popover is triggered from.

**Open Popover** has a **Position** setting. The default is **Infer from event**. This will open the selected Popover positioned relatively to the clicked component, for example, a Button, following the **Anchor Origin** setting on the [**Popover**](https://docs.appfarm.io/library/ui-components/popover.md) component.

You may also set **Position** to **Custom.** This will open the Popover relative to the top-left corner of the viewport (the visible view), at a given number of pixels from top-left. Set the distance in pixels with **Position top** (from the top of the viewport) and **Position left** (from the left of the viewport). This will happen regardless of where you have put your Popover UI Component in the UI Editor.

All Popovers in the App will be visible in the dropdown menu on the **Popover** property in the Action Node setup.

### Properties

| Property          | Description                                                                                                                                                                    |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Popover**       | The popover to open. Required.                                                                                                                                                 |
| **Position**      | How the popover is placed. **Infer from event** (default) places it next to the component that triggered the action. **Custom** places it at a fixed position in the viewport. |
| **Position top**  | Shown when **Position** is **Custom**. Distance in pixels from the top of the viewport. Empty means 0.                                                                         |
| **Position left** | Shown when **Position** is **Custom**. Distance in pixels from the left of the viewport. Empty means 0.                                                                        |

{% hint style="info" %}
**Note:** If you try to open a Popover that is not visible in the current View, nothing will happen. This happens when the Popover is located in another View, or it is placed within a Container or Visibility Group with a visibility condition currently evaluating to false.

When using multiple Popovers in your App, it is important to give a unique Name to the Popover UI Components, in order to be able to select the correct Popover using the Open Popover Action Node.
{% endhint %}

{% hint style="info" %}
Showroom: [Open popover example](https://showroom.appfarm.app/action-nodes/open-popover), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

## Close popover

The **Close Popover** Action Node will close the selected [**Popover**](https://docs.appfarm.io/library/ui-components/popover.md). The Close Popover Action Node is typically used to close the popover when a user clicks a button inside the popover to perform an action.

All Popovers in the App will be visible in the dropdown menu on the **Popover** property in the Action Node setup.

Popovers are also closed when clicking outside of the popover when open.

If the selected popover is not open, nothing happens and no error is raised.

### Properties

| Property    | Description                                                                                                                   |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Popover** | The popover to close. Required. Unlike Close Dialog, there is no default that closes the current popover, so always pick one. |


---

# 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/library/action-nodes/open-and-close-popover.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.
