How to integrate darkmode in STreamlit apps

Is there any workaround for integrating Dark mode in our streamlit apps ?

Hello @Shivam_purbia,

Dark mode (and theming in general) is under development and should be coming soon (though I don’t have an exact release date to give you!).

Some users have success using a browser extension too: Workaround for local Dark Mode with browser extension Dark Reader

Cheers,
Fanilo

1 Like

@andfanilo Well, I have found a simple workaround. not so optimal but works fine with simple application.

darkmode = """
<style>
body {
  background-color: black;
  color: white;
}
</style>
"""
buffer = st.sidebar.checkbox('click here to Toggle')
if buffer:
    st.markdown(darkmode,unsafe_allow_html=True)
st.header("Theme will change")
3 Likes