Reader small image

You're reading from  Web App Development Made Simple with Streamlit

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781835086315
Edition1st Edition
Right arrow
Author (1)
Rosario Moscato
Rosario Moscato
author image
Rosario Moscato

Rosario Moscato has a master's degree in electronic engineering, a second level master in internet software design and a first level master's in science and faith. In about 25 years of experience, he has worked on innovative technology development in Europe and Asia. Recently, his interests have been focused exclusively on AI, pursuing the goal of making every business extremely competitive and analyzing the ethical implications deriving from the new scenarios that these disciplines open. Rosario has authored two books, and he is a speaker at international research centres and conferences as well as a trainer and technical/scientific consultant. Currently, he is working as CTO with one of the oldest AI companies in Italy.
Read more about Rosario Moscato

Right arrow

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

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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Web App Development Made Simple with Streamlit
Published in: Feb 2024Publisher: PacktISBN-13: 9781835086315

Author (1)

author image
Rosario Moscato

Rosario Moscato has a master's degree in electronic engineering, a second level master in internet software design and a first level master's in science and faith. In about 25 years of experience, he has worked on innovative technology development in Europe and Asia. Recently, his interests have been focused exclusively on AI, pursuing the goal of making every business extremely competitive and analyzing the ethical implications deriving from the new scenarios that these disciplines open. Rosario has authored two books, and he is a speaker at international research centres and conferences as well as a trainer and technical/scientific consultant. Currently, he is working as CTO with one of the oldest AI companies in Italy.
Read more about Rosario Moscato