<jupyter_start><jupyter_text>Widget List  Complete list For a complete list of the widgets available to you, you can list the classes in the widget namespace (as seen below).  `Widget` and `DOMWidget`, not listed below, are base classes.Widgets that have a `description` attribute can render Latex equations.<jupyter_code>import ipywidgets as widgets
[n for n in dir(widgets) if not n.endswith('Widget') and n[0] == n[0].upper() and not n[0] == '_']<jupyter_output><empty_output><jupyter_text>Numeric widgets There are 8 widgets distributed with IPython that are designed to display numeric values.  Widgets exist for displaying integers and floats, both bounded and unbounded.  The integer widgets share a similar naming scheme to their floating point counterparts.  By replacing `Float` with `Int` in the widget name, you can find the Integer equivalent.  FloatSlider<jupyter_code>widgets.FloatSlider(
    value=7.5,
    min=5.0,
    max=10.0,
    step=0.1,
    description='Test:',
)<jupyter_output><empty_output><jupyter_text>Sliders can also be **displayed vertically**.<jupyter_code>widgets.FloatSlider(
    value=7.5,
    min=5.0,
    max=10.0,
    step=0.1,
    description='Test',
    orientation='vertical',
)<jupyter_output><empty_output><jupyter_text>FloatProgress<jupyter_code>widgets.FloatProgress(
    value=7.5,
    min=5.0,
    max=10.0,
    step=0.1,
    description='Loading:',
)<jupyter_output><empty_output><jupyter_text>BoundedFloatText<jupyter_code>widgets.BoundedFloatText(
    value=7.5,
    min=5.0,
    max=10.0,
    description='Text:',
)<jupyter_output><empty_output><jupyter_text>FloatText<jupyter_code>widgets.FloatText(
    value=7.5,
    description='Any:',
)<jupyter_output><empty_output><jupyter_text>Boolean widgets There are two widgets that are designed to display a boolean value.  ToggleButton<jupyter_code>widgets.ToggleButton(
    description='Click me',
    value=False,
)<jupyter_output><empty_output><jupyter_text>Checkbox<jupyter_code>widgets.Checkbox(
    description='Check me',
    value=True,
)<jupyter_output><empty_output><jupyter_text>Selection widgets There are four widgets that can be used to display single selection lists, and one that can be used to display multiple selection lists.  All inherit from the same base class.  You can specify the **enumeration of selectable options by passing a list**.  You can **also specify the enumeration as a dictionary**, in which case the **keys will be used as the item displayed** in the list and the corresponding **value will be returned** when an item is selected.  Dropdown<jupyter_code>from IPython.display import display
w = widgets.Dropdown(
    options=['1', '2', '3'],
    value='2',
    description='Number:',
)
display(w)
w.value<jupyter_output><empty_output><jupyter_text>The following is also valid:<jupyter_code>w = widgets.Dropdown(
    options={'One': 1, 'Two': 2, 'Three': 3},
    value=2,
    description='Number:',
)
display(w)
w.value<jupyter_output><empty_output><jupyter_text>RadioButtons<jupyter_code>widgets.RadioButtons(
    description='Pizza topping:',
    options=['pepperoni', 'pineapple', 'anchovies'],
)<jupyter_output><empty_output><jupyter_text>Select<jupyter_code>widgets.Select(
    description='OS:',
    options=['Linux', 'Windows', 'OSX'],
)<jupyter_output><empty_output><jupyter_text>ToggleButtons<jupyter_code>widgets.ToggleButtons(
    description='Speed:',
    options=['Slow', 'Regular', 'Fast'],
)<jupyter_output><empty_output><jupyter_text>SelectMultipleMultiple values can be selected with shift and ctrl pressed and mouse clicks or arrow keys.<jupyter_code>w = widgets.SelectMultiple(
    description="Fruits",
    options=['Apples', 'Oranges', 'Pears']
)
display(w)
w.value<jupyter_output><empty_output><jupyter_text>String widgets There are 4 widgets that can be used to display a string value.  Of those, the **`Text` and `Textarea` widgets accept input**.  The **`Label` and `HTML` widgets display the string** as either Latex or HTML respectively, but **do not accept input**.  Text<jupyter_code>widgets.Text(
    description='String:',
    value='Hello World',
)<jupyter_output><empty_output><jupyter_text>Textarea<jupyter_code>widgets.Textarea(
    description='String:',
    value='Hello World',
)<jupyter_output><empty_output><jupyter_text>Label<jupyter_code>widgets.Label(
    value="$$\\frac{n!}{k!(n-k)!} = \\binom{n}{k}$$",
)<jupyter_output><empty_output><jupyter_text>HTML<jupyter_code>widgets.HTML(
    value="Hello <b>World</b>"
)<jupyter_output><empty_output><jupyter_text>Button<jupyter_code>widgets.Button(description='Click me')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12475675675675675, 'fraction_numerical': 0.010594594594594595, 'mean_word_length': 6.1720930232558135, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '19', 'dir': 'jupyter-structured-clean-dedup', 'id': '21585', 'license': 'MIT', 'n_tokens_mistral': 1586, 'n_tokens_neox': 1531, 'n_words': 375, 'path': 'Tutorials/Interactive Widgets/Widget List.ipynb', 'repo_name': 'aagrosch/jupyter4jsc', 'size': '4625'}