Skip to content

Commit 8398d35

Browse files
authored
[Docs] Add docs for theme presets (#2202)
1 parent 69ccef1 commit 8398d35

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

docs/en/nodes/config/ui-theme.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ colors:
77
Groups - Background: The background color of any groups rendered on the page
88
Groups - Outline: The color of the border of any groups rendered on the page
99
sizes:
10-
Row Height: How tall a single row (unit of height) should render in the Dashboard. Options here are Default (48px), Comfortable (36px) and Compact (32px).
10+
Row Height: How tall a single row (unit of height) should render in the Dashboard. Options here are Default (48px), Comfortable (38px) and Compact (32px).
1111
Page Padding: The spacing that surrounds all of the groups on a page. Applicable for Grid & Fixed layouts and Notebook layouts where the screen width is narrower than 1024px.</br></br>You can define the padding for each side of the page separately by using <a href="https://www.w3schools.com/css/css_padding.asp#:~:text=Padding%20%2D%20Shorthand%20Property" target="_blank">CSS Shorthand notation</a>
1212
Group Gap: "The gap between each group in a layout. Default: 12px"
1313
Group Border Radius: "The border radius of the surrounding of each group on a page. Default: 4px"
@@ -21,6 +21,22 @@ sizes:
2121

2222
Each page can be assigned a theme, which will be used to render the page. The theme is a collection of colors that control the look and feel of the widgets.
2323

24+
## Presets
25+
26+
Dashboard ships with five built-in presets: **Light**, **Dark**, **Dracula**, **Nord**, and **Sepia**. A preset fills in all five colors and the sizes in one step, giving you a complete color scheme without setting each value individually.
27+
28+
<img src="/images/theme-presets.png" alt="The Preset dropdown in a ui-theme node" width="350"/>
29+
30+
- **Pick a preset:** open a `ui-theme` node and choose from the **Preset** dropdown. Every color updates at once.
31+
- **Customize:** change any individual color and the dropdown switches to **Custom**, keeping the rest of the scheme intact. Adjusting sizes does not change the preset.
32+
- **Set the default for new themes:** in the Dashboard sidebar, the **Theme preset** control next to **+ Theme** sets which preset new themes start from. New dashboards start on **Light**.
33+
34+
### Dark themes
35+
36+
When a theme's page background is dark, the dashboard automatically adapts its supporting elements — input fields, borders, charts, and gauges — so nothing sits light against a dark background. This is driven by the page background color, so it applies to **any** dark theme you build, not only the built-in dark presets.
37+
38+
The bundled presets were chosen to meet WCAG AA contrast for text and icons.
39+
2440
## Colors
2541

2642
<PropsTable property="colors" :hide-dynamic="true"/>
@@ -48,4 +64,4 @@ Colors here were chosen to make it easier to differentiate between the different
4864
![Default (Left), Comfortable (Middle), Compact (Right) row height comparisons for a UI Table element](/images/node-examples/ui-theme-row-height.png "Default (Left), Comfortable (Middle), Compact (Right) row height comparisons for a UI Table element"){data-zoomable}
4965
_Default (Left), Comfortable (Middle), Compact (Right) row height comparisons for a UI Table element_
5066

51-
The Row Height controls how tall a single row (unit of height) should render in the Dashboard. Options here are Default (48px), Comfortable (36px) and Compact (32px).
67+
The Row Height controls how tall a single row (unit of height) should render in the Dashboard. Options here are Default (48px), Comfortable (38px) and Compact (32px).
45.1 KB
Loading

0 commit comments

Comments
 (0)