Understanding theming and .toml files
At the beginning of this chapter, in the Understanding new features related to deep customization section, we learned how to change the theme of our web apps directly from the browser. Streamlit has supported natively custom theming since version 0.79.0, which means that we can customize our theme directly from the backend without working in the browser.
We’ve already seen that there is a hidden directory named .streamlit
and that inside this directory, there is a file named config.toml
.
If we want to customize the theme, first of all, we must open this config.toml
file, then add the following instructions to it:
Figure 14.14: Theme configuration with the config.toml file
The configuration in Figure 14.14 is the classical light theme. If you want to have a completely different effect, you can use your preferred color codes and choose a font between Sans-serif, Serif, or Monospace. To get a quick indication...