Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_navbar-0.1.0-py3-none-any.whl (349.4 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-navbar-0.1.0.tar.gz.

File metadata

  • Download URL: streamlit-navbar-0.1.0.tar.gz
  • Upload date:
  • Size: 347.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for streamlit-navbar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ab33facd74bc36a08cbfdec36203777af7c27e65e2035a36a51ec40b4ca12703
MD5 7bb556d829898fa0ee422f977abf4194
BLAKE2b-256 85cefd1a0aa7cd6df436f706e44c36435108ec277279ef4b23ac7183255a7b31

See more details on using hashes here.

File details

Details for the file streamlit_navbar-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_navbar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcfde4e3b6cb64c253979017d3f85dc2ff0e010fa7c9caeaa2be56b5024a5e9f
MD5 119d73bbbf2320f0d23023a47c1ec509
BLAKE2b-256 ed86d3bb5b5c928b980afb9960f640ae4d6c3361d1d5d95f29fc3312450e00b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page