Streamlit Navbar Component
Import
from streamlit_navbar.navbar_component import navbar
Implementation
selected_link = navbar(links=[
{"text": "Home", "href": "/"},
{"text": "Dashboard", "href": "/dashboard"},
{"text": "About", "href": "/about"},
{"text": "Contact", "href": "/contact"}
], logo=base64_string, app_name="Dataframe Components", style={
"background_color":"#cccccc",
"item_color":"white",
"app_title_color":"white",
"logo_height":"40px",
"menu_size":20,
"border_radius":"0px",
"active_menu_color":"blue"
})
Control menu item click
if selected_link:
if selected_link == "/":
st.subheader("Home")
if selected_link == "/dashboard":
st.subheader("Dashboard")
if selected_link == "/about":
st.subheader("About")
if selected_link == "/contact":
st.subheader("Contact")
else:
st.subheader("Home")
Metadata
Release files for streamlit-navbar 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| streamlit-navbar-0.1.0.tar.gz | 347.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamlit_navbar-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 696.9 kB