Skip to main content

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)

Source distribution for streamlit-navbar 0.1.0
File Size Uploaded
streamlit-navbar-0.1.0.tar.gz 347.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-navbar 0.1.0
File Interpreter ABI Platform
streamlit_navbar-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 696.9 kB

Release files / streamlit-navbar-0.1.0.tar.gz

Download URL streamlit-navbar-0.1.0.tar.gz
Size 347.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab33facd74bc36a08cbfdec36203777af7c27e65e2035a36a51ec40b4ca12703
BLAKE2b-256 checksum
How to use checksums
85cefd1a0aa7cd6df436f706e44c36435108ec277279ef4b23ac7183255a7b31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release files / streamlit_navbar-0.1.0-py3-none-any.whl

Download URL streamlit_navbar-0.1.0-py3-none-any.whl
Size 349.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcfde4e3b6cb64c253979017d3f85dc2ff0e010fa7c9caeaa2be56b5024a5e9f
BLAKE2b-256 checksum
How to use checksums
ed86d3bb5b5c928b980afb9960f640ae4d6c3361d1d5d95f29fc3312450e00b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page