Path: blob/main/examples/reference/widgets/MultiChoice.ipynb
3241 views
The MultiChoice 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 MultiSelect, CrossSelector, CheckBoxGroup and CheckButtonGroup widgets. The MultiChoice widget provides a much more compact UI than MultiSelect.
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 layout and styling how-to guides.
Core
options(list or dict): List or dictionary of optionsmax_items(int): Maximum number of options that can be selectedvalue(list): Currently selected option values
Display
delete_button(boolean): Whether to display a button to delete a selected optiondisabled(boolean): Whether the widget is editablename(str): The title of the widgetoption_limit(int): Maximum number of options to display at once.search_option_limit(int): Maximum number of options to display at once if search string is entered.placeholder(str): String displayed when no selection has been made.solid(boolean): Whether to display widget with solid or light style.
MultiChoice.value returns a list of the currently selected options:
The solid option controls the style of the widget:
Controls
The MultiChoice widget exposes a number of options which can be changed from both Python and Javascript. Try out the effect of these parameters interactively: