Add spacing between tabs

Nice one @edsaac! Today I learnt about str.space :smiling_face:

For streamlit >= 1.16.0

See https://playground.streamlit.app?q=bigger-tabs-v1-16, you would need:

font_css = """
<style>
button[data-baseweb="tab"] > div[data-testid="stMarkdownContainer"] > p {
  font-size: 24px;
}
</style>
"""

st.write(font_css, unsafe_allow_html=True)

For streamlit < 1.16.0

@tommaso-moro you can give the following a try:

tabs_font_css = """
<style>
button[data-baseweb="tab"] {
  font-size: 26px;
}
</style>
"""

st.write(tabs_font_css, unsafe_allow_html=True)

Here’s how a full example would look like:

5 Likes