You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will upload a Python Package using Twine when a release is created
2
+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|`primaryColor`|`"#1A6CE7"`|`primaryColor` defines the accent color most often used throughout a Streamlit app. A few examples of Streamlit widgets that use `primaryColor` include `st.checkbox`, `st.slider`, and `st.text_input` (when focused). |
15
-
|`backgroundColor`|`"#FFFFFF"`| Defines the background color used in the main content area of your app. |
16
-
|`secondaryBackgroundColor`|`"#F5F5F5"`| This color is used where a second background color is needed for added contrast. Most notably, it is the sidebar's background color. It is also used as the background color for most interactive widgets. |
17
-
|`textColor`|`"#1A1D21"`| This option controls the text color for most of your Streamlit app. |
18
-
|`font`|`0``1``2``"sans serif" ``"serif"``"monospace"`| Selects the font used in your Streamlit app. Valid values are `"sans serif"`, `"serif"`, and `"monospace"`. This option defaults to `"sans serif"` if unset or invalid. |
19
-
|`base`|`light``dark``0``1`| An easy way to define custom themes that make small changes to one of the preset Streamlit themes is to use the base option. |
20
-
|*`widgetBackgroundColor`|`"#FFFFFF"`| The background color of widgets (e.g., inputs, sliders). |
21
-
|*`widgetBorderColor`|`"#D3DAE8"`| The border color for widgets and interactive elements. |
22
-
|*`skeletonBackgroundColor`|`"#CCDDEE"`| The background color used for loading skeletons (placeholders). |
23
-
|*`bodyFont`|`"Inter", "Source Sans Pro", sans-serif`| The default font used for body text throughout the application. |
24
-
|*`codeFont`|`"Apercu Mono", "Source Code Pro", monospace`| The font used for displaying code elements or monospaced text. |
25
-
|*`fontFaces`| Array of font families with URLs and weights | Defines custom fonts, including font-family, URL location, and weight (e.g., Inter, Apercu Mono). |
26
-
|*`radii.checkboxRadius`|`3`| The border radius for checkboxes, defining their rounded corners. |
27
-
|*`radii.baseWidgetRadius`|`6`| The border radius for widgets like buttons or inputs. |
28
-
|*`fontSizes.tinyFontSize`|`10`| The font size for tiny text elements, usually for subtle labels or captions. |
29
-
|*`fontSizes.smallFontSize`|`12`| The font size for small text elements, such as secondary descriptions. |
30
-
|*`fontSizes.baseFontSize`|`14`| The base font size used for standard text. |
31
-
|*`fontFaces`|[Default Props](#font-faces-details-fontfaces-)| The base font families used for dark and light base theme |
|`primaryColor`|`"#1A6CE7"`| The main accent color used throughout your app. For example, widgets like `st.checkbox`, `st.slider`, and `st.text_input` (when focused) use this color. |
31
+
|`backgroundColor`|`"#FFFFFF"`| The main background color of your app. |
32
+
|`secondaryBackgroundColor`|`"#F5F5F5"`| Used as a secondary background color, like for the sidebar or interactive widgets. |
33
+
|`textColor`|`"#1A1D21"`| Controls the text color for most elements in your app. |
34
+
|`font`|`0``1``2`[`"sans serif" ``"serif"``"monospace"`]| Sets the font used in your app. Options are `"sans serif"`, `"serif"`, or `"monospace"`. Defaults to `"sans serif"` if unset. |
35
+
|`base`|`0``1`[`light``dark`]| Lets you create custom themes by slightly modifying one of the preset Streamlit themes. |
36
+
|*`widgetBackgroundColor`|`"#FFFFFF"`| Background color for widgets like inputs or sliders. |
37
+
|*`widgetBorderColor`|`"#D3DAE8"`| Border color for widgets and interactive elements. |
38
+
|*`skeletonBackgroundColor`|`"#CCDDEE"`| Background color for loading placeholders (skeletons). |
39
+
|*`bodyFont`|`"Inter", "Source Sans Pro", sans-serif`| Default font for body text. |
40
+
|*`codeFont`|`"Apercu Mono", "Source Code Pro", monospace`| Font used for code or monospaced text. |
41
+
|*`fontFaces`|[Array of font families with URLs and weights](#font-faces-details-fontfaces-)| Custom fonts, including font-family, URL, and weight (e.g., Inter, Apercu Mono). |
42
+
|*`radii.checkboxRadius`|`3`| Border radius for checkboxes. |
43
+
|*`radii.baseWidgetRadius`|`6`| Border radius for widgets like buttons or inputs. |
44
+
|*`fontSizes.tinyFontSize`|`10`| Font size for tiny text (e.g., labels). |
45
+
|*`fontSizes.smallFontSize`|`12`| Font size for small text, like secondary descriptions. |
46
+
|*`fontSizes.baseFontSize`|`14`| Base font size for regular text. |
32
47
48
+
> The parameters marked with a * are new in Streamlit’s configuration. You can tweak them to adjust fonts and font sizes.
49
+
> Properties with a `.` in their names are part of nested objects. Details about these nested objects are provided below.
33
50
34
51
### Font Faces Details `"fontFaces": [...]`
35
52
@@ -42,67 +59,48 @@ Below is a description of the theme configuration parameters and their functiona
42
59
|`Apercu Mono`|`https://app.snowflake.com/static/e903ae189d31a97e231e.woff2`| 500 | Medium weight of the Apercu Mono font. |
43
60
|`Apercu Mono`|`https://app.snowflake.com/static/32447307374154c88bc0.woff2`| 700 | Bold weight of the Apercu Mono font. |
44
61
45
-
46
62
### Theme Configuration: Properties and Data Types
47
63
48
-
The following table outlines the configuration properties, their expected types, and descriptions based on the provided validation logic:
|`tinyFontSize`|`number`| Font size for tiny text elements. |
90
-
|`smallFontSize`|`number`| Font size for small text elements. |
91
-
|`baseFontSize`|`number`| Default font size for standard text. |
86
+
|`tinyFontSize`|`number`| Font size for tiny text. |
87
+
|`smallFontSize`|`number`| Font size for small text. |
88
+
|`baseFontSize`|`number`| Default font size for regular text. |
89
+
90
+
---
91
+
92
+
### Workaround for Switching Themes Without Custom Components
92
93
93
-
This table ensures clarity in understanding and validating the properties for `CustomThemeConfig`.
94
+
You can use query parameters in the URL to switch between light and dark themes. However, this requires a page reload and won’t allow custom themes. Examples:
94
95
95
-
# Using query paths url options to change the theme between light and dark
96
-
-`?embed_options=light_theme`
97
-
-`?embed_options=dark_theme`
96
+
-`?embed_options=light_theme`
97
+
-`?embed_options=dark_theme`
98
98
99
-
# Using local Storage persistance
100
-
-`stActiveTheme-/-v1`
99
+
---
101
100
102
-
Automatically saves the current theme change it
101
+
### Override Base "Dark" or "Light" Themes
103
102
104
-
# Override base "Dark" or "Light" theme
105
-
### JSON Base Configuration for Streamlit Dark Theme
103
+
Currently, you can’t override the default "Dark" or "Light" themes directly in Streamlit. Until the Streamlit team releases support for the `SET_CUSTOM_THEME_CONFIG` event, you’re limited to modifying the available properties listed above.
0 commit comments