RadioBoxGroup#
Download this notebook from GitHub (right-click to download).
import panel as pn
import panel_material_ui as pmui
pn.extension()
The RadioBoxGroup
widget allows selecting from a list or dictionary of values using a set of checkboxes. It falls into the broad category of single-value, option-selection widgets that provide a compatible API and include the RadioButtonGroup
, Select
and DiscreteSlider
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): A list or dictionary of options to select fromvalue
(object): The current value; must be one of the option values
Display#
color
(str): A color variant; should be one of'default'
(white),'primary'
(blue),'success'
(green),'info'
(yellow),'light'
(light), or'danger'
(red).inline
(boolean): Whether to arrange the items vertically in a column (False
) or horizontally in a line (True
)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:
button_style
: Alias forvariant
button_type
: Alias forcolor
name
: Alias forlabel
radio_group = pmui.RadioBoxGroup(name='RadioBoxGroup', options=['Biology', 'Chemistry', 'Physics'], inline=True)
radio_group
Like most other widgets, RadioBoxGroup
has a value parameter that can be accessed or set:
radio_group.value
Controls#
The RadioBoxGroup
widget exposes a number of options which can be changed from both Python and Javascript. Try out the effect of these parameters interactively:
pn.Row(radio_group.controls(jslink=True), radio_group)
Download this notebook from GitHub (right-click to download).