Custom Themes

Streamlit 1.0, released in October 2021, stabilizes the theming system. Colors, fonts, and styles can be customized via .streamlit/config.toml. The theme applies to all native components and widgets.

Theme Configuration

toml
# .streamlit/config.toml
[theme]
primaryColor = "#FF4B4B"
backgroundColor = "#0E1117"
secondaryBackgroundColor = "#262730"
textColor = "#FAFAFA"
font = "sans serif"
python
import streamlit as st

st.set_page_config(
    page_title='My App',
    layout='wide',
)

st.title('App with custom theme')
st.slider('Value', 0, 100, 50)
st.button('Submit')

# The theme defined in config.toml applies
# automatically to all components

Sources