Summary
Hi,
I’m trying out the streamlit-on-Hover-tabs component. I’m just reproducing the example that is on the readme file of the repo. It works as expected. However, as you can see in the photo provided, the default sidebar still appears (the gray shadow) and there is no toggle x or button to close it.
I believe I followed all the instruction.
I installed the following
pip install streamlit-on-Hover-tabs
I used the code below.
I also included the style.css file in my directory.
Is there another step I’m missing?
from st_on_hover_tabs import on_hover_tabs
import streamlit as st
st.header("Custom tab component for on-hover navigation bar")
st.markdown('<style>' + open('./style.css').read() + '</style>', unsafe_allow_html=True)
with st.sidebar:
tabs = on_hover_tabs(tabName=['Dashboard', 'Money', 'Economy'],
iconName=['dashboard', 'money', 'economy'], default_choice=0)
if tabs =='Dashboard':
st.title("Navigation Bar")
st.write('Name of option is {}'.format(tabs))
elif tabs == 'Money':
st.title("Paper")
st.write('Name of option is {}'.format(tabs))
elif tabs == 'Economy':
st.title("Tom")
st.write('Name of option is {}'.format(tabs))
Thanks for the help
Debug info
- Streamlit version: 1.13.0
- Python version: Python 3.10.7