Hi all
I would like to set the default load theme (e.g. dark, light), without having to navigate to the hamburger after loading.
Sometimes the app “remembers” to load dark/light however is there a more consistent way to set this? Thanks
Hi all
I would like to set the default load theme (e.g. dark, light), without having to navigate to the hamburger after loading.
Sometimes the app “remembers” to load dark/light however is there a more consistent way to set this? Thanks
Hi @littlefield,
You can add theme configuration parameters to a config.toml file and that will enable the app to load automatically with that configuration, for example:
primaryColor = "F36295"
backgroundColor = "#F0FF33"
secondaryBackgroundColor = "#3183D1"
textColor = "#03080C"
font = "sans-serif"
Check out our theme documentation here.
Best,
Caroline
Also, if you just want to set light or dark theme as a default for the viewer, you can write
[theme]
base = "light"
or
[theme]
base = "dark"
into .streamlit/config.toml. See also here.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.