I tried your approach but still nothing appears on the default header and no errors as while running.
I am trying to add the logged-in username info on the top header but nothing seems to appear.
i am using the below code to test.
def main():
st.set_page_config(
page_title="Streamlit_App_to_test_SSO", layout="wide"
)
st.markdown(
"""
<style>
.st-key-sticky-header {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: 9999;
height: 56px;
padding: 8px 16px;
background-color: transparent;
pointer-events: none;
}
.st-key-sticky-header \* {
pointer-events: auto;
}
</style>
""",
unsafe_allow_html=True,
)
# Container
if HAS_STYLED:
print(" inside sticky header true...")
sticky_header = st_yled.container(
key="sticky-header",
horizontal=True,
vertical_alignment="center",
)
else:
sticky_header = st.container()
print(" inside sticky header false...")
with sticky_header:
col_spacer, col_user = st.columns(\[8, 2\])
with col_spacer:
st.write("")
with col_user:
st.markdown(
f"""
<div style="text-align:right;font-weight:600;">
{user\['name'\]}
</div>
""",
unsafe_allow_html=True,
)
–- rest of my other code