Allow users to select an option by interacting with a checkbox

Basic Example

Basic use of read_checkbox

Optional field

If check the box is optional, pass the optional parameter required

Use markdown to customize label

Use markdown syntax to customize the label

Function signature

def (label: str, **kwargs):

Positional parameters

label (str)
The label to display to the user

Keyword Arguments

initial_value (str)
The initial value to display to the user. Defaults to None.
disabled (bool)
whether the input is disabled. Defaults to False.
required (Union[bool, str])
Whether the input is required or not eg. "this field is required". Defaults to True.
hint (str)
A tooltip displayed to the user. Defaults to None.
end_program (bool)
Whether the program should end after the widget is shown. Defaults to False.
full_width (bool)
Whether the input should use full screen width. Defaults to False.
button_text (str)
What text to display on the button when the widget is not part of a Page. Defaults to 'Next'.

Returns

()list(str) or list(float): The value entered by the user