Skip to main content
streamlit-option-menu is a simple Streamlit component that allows users to select a single item from a list of options in a menu.
It is similar in function to st.selectbox(), except that:
- It uses a simple static list to display the options instead of a dropdown
- It has configurable icons for each option item and the menu title

It is built on [streamlit-component-template-vue](https://github.com/andfanilo/streamlit-component-template-vue), styled with [Bootstrap](https://getbootstrap.com/) and with icons from [bootstrap-icons](https://icons.getbootstrap.com/)

## Installation
```
pip install streamlit-option-menu
```

## Parameters
The `option_menu` function accepts the following parameters:
- menu_title (required): the title of the menu; pass None to hide the title
- options (required): list of (string) options to display in the menu; set an option to "---" if you want to insert a section separator
- default_index (optional, default=0): the index of the selected option by default
- menu_icon (optional, default="menu-up"): name of the [bootstrap-icon](https://icons.getbootstrap.com/) to be used for the menu title
- icons (optional, default=["caret-right"]): list of [bootstrap-icon](https://icons.getbootstrap.com/) names to be used for each option; its length should be equal to the length of options
- orientation (optional, default="vertical"): "vertical" or "horizontal"; whether to display the menu vertically or horizontally

The function returns the (string) option currently selected

## Example
```
import streamlit as st
from streamlit_option_menu import option_menu

with st.sidebar:
selected = option_menu("Main Menu", ["Home", 'Settings'],
icons=['house', 'gear'], menu_icon="cast", default_index=1)
selected

# horizontal Menu
selected2 = option_menu(None, ["Home", "Upload", "Tasks", 'Settings'],
icons=['house', 'cloud-upload', "list-task", 'gear'],
menu_icon="cast", default_index=0, orientation="horizontal")
selected2
```

Metadata

Release files for streamlit-option-menu-patch 0.3.12

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-option-menu-patch 0.3.12
File Size Uploaded Provenance Actions
streamlit_option_menu_patch-0.3.12.tar.gz 821.1 kB Without provenance Details for streamlit_option_menu_patch-0.3.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-option-menu-patch 0.3.12
File Interpreter ABI Platform Actions
streamlit_option_menu_patch-0.3.12-py3-none-any.whl Python 3 none any Details for streamlit_option_menu_patch-0.3.12-py3-none-any.whl

Total release size: 1.6 MB

Release files / streamlit_option_menu_patch-0.3.12.tar.gz

Download URL streamlit_option_menu_patch-0.3.12.tar.gz
Size 821.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1bc211c06a44c035853c81a9f36fb9f93d6f4fdd945e5b584e803c8367eefe67
BLAKE2b-256 checksum
How to use checksums
c324ce8634bd004a8990142751cd09dbac8048531ff3724bcf22d6ebb7418202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.4

Release files / streamlit_option_menu_patch-0.3.12-py3-none-any.whl

Download URL streamlit_option_menu_patch-0.3.12-py3-none-any.whl
Size 823.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90aecb9b8360a5ddfbf87713b626c8f3ad182e82a6176304bfd7960b1be00757
BLAKE2b-256 checksum
How to use checksums
f6ae77b6024e68220a84c92ac56ded4d35966f63d4b242d4fa94aab6ff27091d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.4

Security for streamlit-option-menu-patch 0.3.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.12 This release

2 release files No provenance

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