> For the complete documentation index, see [llms.txt](https://docs.quickdev.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickdev.cloud/applications/styling/themes.md). Agents can also search and read this documentation through its [MCP server](https://docs.quickdev.cloud/~gitbook/mcp).

# Themes

A well-crafted user interface (UI) enriches user experience (UX) and fosters increased user engagement. In QuickDEV, you possess the flexibility to tailor the style of each component and leverage the theme feature to design the interface at either the app or workspace level. Furthermore, functionalities such as icon configuration and hint messages play a pivotal role in enhancing app interaction, thereby promoting a more user-friendly experience.

The **theme feature** streamlines the process of configuring styles across all your apps within a workspace. This includes setting attributes such as the primary color of the apps and the default background color of containers. Once created, themes are readily accessible, and you can apply them to individual apps as needed.

## Create a theme

Workspace administrators can access theme settings in QuickDEV. To do so, navigate to the QuickDEV homepage, then select **Settings** > **Themes**. From there, click on **+ Create** theme, provide a name for the theme, and choose one of the preset default themes as the starting point.

<figure><img src="https://2228196961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOetSCIB8nFF7hAJCTarW%2Fuploads%2FJmHA6zHaESupunjdNsAC%2Fcreate-theme.png?alt=media&amp;token=f6e55f2a-f5ca-4ac2-9290-12571f2eef7f" alt=""><figcaption></figcaption></figure>

Preview the real-time theme effect on the right.

To create or modify ECharts styles JSON for charts, you can utilize the [ECharts style Editor](https://echarts.apache.org/en/theme-builder.html) to streamline the process. This tool provides a convenient way to generate and preview styles before implementation, ensuring an efficient and visually pleasing design for your charts.

## Apply a theme

By selecting the gear icon ⚙️ on the left sidebar of the app editor, you can modify the theme. Next, pick a theme using the options found in the **Theme setting**.

<figure><img src="https://2228196961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOetSCIB8nFF7hAJCTarW%2Fuploads%2FTrzeBA5ePgFiqgwwuUgc%2Fapply-theme.png?alt=media&amp;token=230113c3-9543-4379-8df6-426ab456bb00" alt=""><figcaption></figcaption></figure>

You can set the standard theme for all applications in a workspace using the Settings > **Themes option** on the QuickDEV homepage.

<figure><img src="https://2228196961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOetSCIB8nFF7hAJCTarW%2Fuploads%2FQPMIpG2YIrzoQqZi7v8w%2Fset-default-theme.png?alt=media&amp;token=8a3b2cee-19cc-4ede-ad67-26ecd420defc" alt=""><figcaption></figcaption></figure>

## Switching themes dynamically

Both calling the method `theme.switchTo()` and accessing the global variable `theme` are possible to enable end users to utilize JavaScript to change the apps' theme to their own.There are three fields in the global variable `theme`. These are shown in the data browser.

* The variables `id` and `name` are strings denoting the ID and name of the current theme. When these values are empty, the default theme is applied.
* The variable `allThemes` is an array that encompasses all the information pertaining to the available themes within the current workspace.

The method `theme.switchTo()` facilitates switching the theme on the end user's side, necessitating only a theme ID. If an empty string `""` is passed, the default theme is applied. Once the end user switches the theme, it will be stored in the user's browser local storage. Subsequently, this theme will supersede the default theme and be applied to all apps used in the same browser.
