> 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/how-to/themes-and-styling/change-the-active-theme.md).

# Change the active theme

By default an app will use the theme set in [App settings](/reference/apps/app-settings.md#general-settings). To set a different theme you need to run an action, either automatically or triggered by the user, that contains the [Set theme action node](/library/action-nodes/set-theme.md). The selected theme is stored in the [built-in App variable](/reference/apps/data/app-variables.md#built-in-app-variables) **Active Theme**.

## Step 1

Add a Select component to the UI with **Value** bound to `App Variables.Active Theme`. In the app, the drop-down list will be populated with the [themes](/reference/resources/themes.md) that you have added to your solution and the active theme will be selected.

## Step 2

Use the **On Value Change** event handler of the Select component to run a new action. In that action, add the [Set theme action node](/library/action-nodes/set-theme.md). Set the **Theme from data** property to `App Variables.Active Theme`. Now, when a new selection is made from the drop-down in the UI, the active theme will be applied to the app for that user.

Note that this configuration will not store the user's selection for future sessions. To do that, you might want to store their preference in an object attached to their user. Then, you can run an action using the [On app load event handler](/reference/apps/app-settings.md#event-handlers) with [Set theme](/library/action-nodes/set-theme.md) and **Theme from data** bound to the object class property where you have the preference stored.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.appfarm.io/how-to/themes-and-styling/change-the-active-theme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
