Skip to main content
Ctrl+K
The Bokeh logo
3.7.2 (latest)3.6.33.5.23.4.22.4.3dev (3.8)

Site Navigation

  • First steps
  • User guide
  • Gallery
  • Reference
  • Contribute
  • Releases
  • Tutorial
  • Community

Site Navigation

  • First steps
  • User guide
  • Gallery
  • Reference
  • Contribute
  • Releases
  • Tutorial
  • Community
  • dropdown

dropdown#

from bokeh.io import show
from bokeh.models import CustomJS, Dropdown

menu = [("Item 1", "item_1"), ("Item 2", "item_2"), None, ("Item 3", "item_3")]

dropdown = Dropdown(label="Dropdown button", button_type="warning", menu=menu)
dropdown.js_on_event("menu_item_click", CustomJS(code="console.log('dropdown: ' + this.item, this.toString())"))

show(dropdown)
Project
  • Roadmap
  • Team
  • Branding
Documentation
  • User Guide
  • Gallery
  • Reference Guide
Hands On
  • Tutorials
  • Demos
  • Support
Contribute
  • GitHub
  • Contributor Guide
  • Sponsor

Bokeh is a fiscally sponsored project of NumFOCUS, a nonprofit dedicated to supporting the open-source scientific computing community. Donations help pay for cloud hosting costs, travel, and other project needs.

©2023 Bokeh Contributors. The website content uses the BSD License and is covered by the Bokeh Code of Conduct.

Donate