Spaces:
Running
Running
James McCool
commited on
Commit
·
0672989
1
Parent(s):
572db67
Enhance Streamlit radio button styling with custom CSS
Browse filesImplemented custom CSS for radio buttons to improve visual design and interactivity. Added hover and selection effects with gold color scheme, including white text, rounded corners, and smooth transitions to enhance user interface aesthetics.
app.py
CHANGED
@@ -50,6 +50,27 @@ st.markdown("""
|
|
50 |
background-color: #DAA520;
|
51 |
cursor: pointer;
|
52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</style>""", unsafe_allow_html=True)
|
54 |
|
55 |
@st.cache_data(ttl = 60)
|
|
|
50 |
background-color: #DAA520;
|
51 |
cursor: pointer;
|
52 |
}
|
53 |
+
|
54 |
+
.stRadio [data-baseweb="radio"] {
|
55 |
+
white-space: pre-wrap;
|
56 |
+
background-color: #FFD700;
|
57 |
+
color: white;
|
58 |
+
border-radius: 10px;
|
59 |
+
gap: 1px;
|
60 |
+
padding: 10px 20px;
|
61 |
+
font-weight: bold;
|
62 |
+
transition: all 0.3s ease;
|
63 |
+
}
|
64 |
+
|
65 |
+
.stRadio [aria-selected="true"] {
|
66 |
+
background-color: #DAA520;
|
67 |
+
color: white;
|
68 |
+
}
|
69 |
+
|
70 |
+
.stRadio [data-baseweb="tab"]:hover {
|
71 |
+
background-color: #DAA520;
|
72 |
+
cursor: pointer;
|
73 |
+
}
|
74 |
</style>""", unsafe_allow_html=True)
|
75 |
|
76 |
@st.cache_data(ttl = 60)
|