Images in dropdown

I am making dropdown lists:

It seems like i can only put strings in the menu items, but i need to show a different small preview image in each dropdown menu entry. How do i do that?

To do that, you have to create a custom class (that probably extends the Bokeh’s Dropdown) with a custom JavaScript/TypeScript implementation that does that. The only things you would need to change are some properties types and the DropdownView.render method.

1 Like