A responsive navbar component for Streamlit apps.
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit-navbar-0.1.0.tar.gz
(347.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters