Spaces:
Running
Running
import streamlit as st | |
def cloud_button(label, key): | |
button_html = f""" | |
<div style="text-align: center; display: inline-block;"> | |
<div style="display: inline-flex; position: relative;"> | |
<div style="background-color: #FF6347; border-radius: 50%; width: 60px; height: 60px; margin: 5px;"></div> | |
<div style="background-color: #FF6347; border-radius: 50%; width: 80px; height: 80px; margin: 5px; position: absolute; left: 30px; top: 10px;"></div> | |
<div style="background-color: #FF6347; border-radius: 50%; width: 70px; height: 70px; margin: 5px; position: absolute; left: 70px;"></div> | |
</div> | |
<div style="margin-top: -50px;">{label}</div> | |
</div> | |
""" | |
st.markdown(button_html, unsafe_allow_html=True) | |
return st.button("", key=key, use_container_width=True) | |
if cloud_button("Click Me!", "button1"): | |
st.success("Button 1 clicked!") | |
if cloud_button("Another Button", "button2"): | |
st.success("Button 2 clicked!") | |