MultiSelect#
Download this notebook from GitHub (right-click to download).
import panel as pn
import panel_material_ui as pmui
pn.extension()
The MultiSelect widget allows selecting multiple values from a list of options. It falls into the broad category of multi-value, option-selection widgets that provide a compatible API and include the CrossSelector, CheckBoxGroup and CheckButtonGroup widgets.
Discover more on using widgets to add interactivity to your applications in the how-to guides on interactivity. Alternatively, learn how to set up callbacks and (JS-)links between parameters or how to use them as part of declarative UIs with Param.
Parameters:#
For details on other options for customizing the component see the customization guides.
Core#
disabled(boolean): Whether the widget is editableoptions(list or dict): List or dictionary of optionsvalue(list): Currently selected option values
Display#
label(str): The title of the widget
Styling#
sx(dict): Component level styling API.theme_config(dict): Theming API.
Aliases#
For compatibility with Panel certain parameters are allowed as aliases:
name: Alias forlabel
multi_select = pmui.MultiSelect(label='MultiSelect', value=['Apple', 'Pear'],
options=['Apple', 'Banana', 'Pear', 'Strawberry'], size=8)
multi_select
MultiSelect.value returns a list of the currently selected options:
multi_select.value
Controls#
The MultiSelect widget exposes a number of options which can be changed from both Python and Javascript. Try out the effect of these parameters interactively:
pmui.Row(multi_select.controls(jslink=True), multi_select)
Download this notebook from GitHub (right-click to download).