Various kinds of input widgets and form controls.
AutocompleteInput
Bases: bokeh.models.widgets.inputs.TextInput
bokeh.models.widgets.inputs.TextInput
Single-line input widget with auto-completion.
completions
property type: List ( String )
List
String
A list of completion strings. This will be used to guide the user upon typing the beginning of a desired value.
min_characters
property type: PositiveInt
PositiveInt
The number of characters a user must type before completions are presented.
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "completions": [], "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14641", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_characters": 2, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }
ColorPicker
Bases: bokeh.models.widgets.inputs.InputWidget
bokeh.models.widgets.inputs.InputWidget
Color picker widget
Warning
This widget as a limited support on Internet Explorer (it will be displayed as a simple text input).
callback
property type: Instance ( Callback )
Instance
Callback
A callback to run in the browser whenever the current date value changes.
color
property type: ColorHex
ColorHex
The initial color of the picked color (named or hexadecimal)
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "color": "#000000", "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14644", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "visible": true, "width": null, "width_policy": "auto" }
DatePicker
Calendar-based date picker widget.
max_date
property type: Date
Date
Optional latest allowable date.
min_date
Optional earliest allowable date.
value
The initial or picked date.
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14647", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_date": null, "max_height": null, "max_width": null, "min_date": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": null, "visible": true, "width": null, "width_policy": "auto" }
FileInput
Bases: bokeh.models.widgets.widget.Widget
bokeh.models.widgets.widget.Widget
Present a file-chooser dialog to users and return the contents of a selected file.
accept
property type: String
Comma-separated list of standard HTML file input filters that restrict what files the user can pick from. Values can be:
Specific file extension(s) (e.g: .gif, .jpg, .png, .doc) are pickable
all sound files are pickable
all video files are pickable
all image files are pickable
A valid IANA Media Type, with no parameters.
filename
The filename of the selected file. The file path is not included as browsers do not allow access to it.
mime_type
The mime type of the selected file.
A base64-encoded string of the contents of the selected file.
{ "accept": "", "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14652", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "visible": true, "width": null, "width_policy": "auto" }
InputWidget
Abstract base class for input widgets.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
title
Widget’s label.
coerce_value
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14657", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "visible": true, "width": null, "width_policy": "auto" }
MultiSelect
Multi-select widget.
A callback to run in the browser whenever the current selection value changes.
options
property type: List ( Either ( String , Tuple ( String , String ) ) )
Either
Tuple
Available selection options. Options may be provided either as a list of possible string values, or as a list of tuples, each of the form (value, label). In the latter case, the visible widget text for each value will be corresponding given label.
(value, label)
size
property type: Int
Int
The number of visible options in the dropdown list. (This uses the select HTML element’s size attribute. Some browsers might not show less than 3 options.)
select
Initial or selected values.
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14659", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "options": [], "orientation": "horizontal", "size": 4, "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": [], "visible": true, "width": null, "width_policy": "auto" }
PasswordInput
Single-line password input widget. Note: Despite PasswordInput inheriting from TextInput the password cannot be inspected on the field value. Also, note that this field functionally just hides the input on the browser, transmitting safely a password as a callback, e.g., to a bokeh server would require some secure connection.
TextInput
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14664", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }
Select
Single-select widget.
A callback to run in the browser whenever the current Select dropdown value changes.
property type: Either ( List ( Either ( String , Tuple ( Either ( Int , String ), String ) ) ), Dict ( String , List ( Either ( String , Tuple ( Either ( Int , String ), String ) ) ) ) )
Dict
Available selection options. Options may be provided either as a list of possible string values, or as a list of tuples, each of the form (value, label). In the latter case, the visible widget text for each value will be corresponding given label. Option groupings can be provided by supplying a dictionary object whose values are in the aforementioned list format
Initial or selected value.
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14665", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "options": [], "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "visible": true, "width": null, "width_policy": "auto" }
Spinner
Spinner widget for numerical inputs
A callback to run in the browser whenever the user unfocuses the SpinBox widget by hitting Enter or clicking outside of the box area.
SpinBox
high
property type: Float
Float
Optional highest allowable value.
low
Optional lowest allowable value.
step
The step added or subtracted to the current value
The initial value of the spinner
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "high": null, "id": "14669", "js_event_callbacks": {}, "js_property_callbacks": {}, "low": null, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "step": 1, "subscribed_events": [], "tags": [], "title": "", "value": 0, "visible": true, "width": null, "width_policy": "auto" }
Single-line input widget.
A callback to run in the browser whenever the user unfocuses the TextInput widget by hitting Enter or clicking outside of the text box area.
DEPRECATED: use .js_on_change or .on_change with “value” or “value_input”
placeholder
Placeholder for empty input field.
Initial or entered text value.
value_input
Initial or entered text value that triggers a callback whenever the value changes.
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14675", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }
TextAreaInput
Multi-line input widget.
cols
Specifies the width of the text area (in average character width). Default: 20
max_length
Max count of characters in field
rows
Specifies the height of the text area (in lines). Default: 2
{ "align": "start", "aspect_ratio": null, "background": null, "callback": null, "cols": 20, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "14680", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_length": 500, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "rows": 2, "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }