Version 0.88.0

Hello @BeyondMyself,

There is a .stDownloadButton class attached to the parent div, so you should be able to changer the BG color and hover effect of those buttons through the CSS Hack with st.markdown Creating a nicely formatted search field? - #2 by andfanilo

import streamlit as st

css = """<style>
.stDownloadButton>button {
    background-color: #4F8BF9;
}

.stDownloadButton>button:hover {
    background-color: black;
</style>
}"""
st.markdown(css, unsafe_allow_html=True)

text_contents = """
Foo, Bar
123, 456
789, 000
"""

st.download_button(
    label="Download CSV",
    data=text_contents,
    mime="text/csv",
    file_name="CSV.csv",
)

Have a nice day :balloon:
Fanilo

5 Likes