> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/concepts/working-with-variables.md).

# UI Bakery variables

**UI Bakery variables** serve as the glue that binds both Action data to UI components/Actions and Component values to Actions/other Components. UI Bakery variables are always wrapped with \
`{{ }}` to distinguish them from JavaScript variables.

You can use component values, action results, state variables, page parameters, etc. as variables.

![](https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2Fcd0AYHwYkHWFgdVAogOo%2FCleanShot%202024-12-03%20at%2015.03.52%402x-min%20\(1\).png?alt=media\&token=3a299ab3-4530-453e-82f5-f7be51acd376)

Variables can be used inside **Component** and **Action properties**. For non-text component properties, you can switch to the `JS` mode to use variables.&#x20;

To start searching for a variable, you just need to type `{{` in the code or text field, and a variables selector will appear.

{% hint style="success" %}
Use **Option ⌥ + Esc** (Mac) or **Ctrl + Space** (Windows/Linux) as shortcuts to open the variables selector.
{% endhint %}

{% @arcade/embed flowId="hHQ1F8IyzfT3ditvOC9F" url="<https://app.arcade.software/share/hHQ1F8IyzfT3ditvOC9F>" %}


---

# 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.uibakery.io/concepts/working-with-variables.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.
