Developing our frontend with Streamlit
In this section, we will begin to discuss some of the elements that allow us to improve the user experience when interacting with our app.
We will show the various frontend elements and how to combine them for complex apps.
Adding the text elements
To improve our user experience, we can start by improving the text elements. The first elements we add are the following:
st.title()
: This sets the main title of your Streamlit app. It’s the largest text element and is typically used for the main heading of your app. Every app should have at least one title, and this is shown in the GitHub-flavored Markdown. This function obviously takes a string.st.header()
: This adds a header to your app. It’s smaller than the title but still stands out as an important section heading. This also has a counterpart in GitHub and is similar in purpose. One attribute you can add isdivider
, which shows a colored divider below the header...