bokeh.models.widgets.inputs¶
Various kinds of input widgets and form controls.
-
class
AutocompleteInput
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.TextInput
Single-line input widget with auto-completion.
-
class
ColorPicker
(**kwargs)[source]¶ Bases:
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
)A callback to run in the browser whenever the current date value changes.
-
color
¶ property type:
ColorHex
The initial color of the picked color (named or hexadecimal)
-
-
class
DatePicker
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.InputWidget
Calendar-based date picker widget.
-
class
FileInput
(**kwargs)[source]¶ Bases:
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:
- <file extension>:
Specific file extension(s) (e.g: .gif, .jpg, .png, .doc) are pickable
- audio/*:
all sound files are pickable
- video/*:
all video files are pickable
- image/*:
all image files are pickable
- <media type>:
A valid IANA Media Type, with no parameters.
-
-
class
InputWidget
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.widget.Widget
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.
-
class
MultiSelect
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.InputWidget
Multi-select widget.
-
callback
¶ property type:
Instance
(Callback
)A callback to run in the browser whenever the current selection value changes.
-
options
¶ property type:
List
(Either
(String
,Tuple
(String
,String
) ) )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.
-
-
class
PasswordInput
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.TextInput
Single-line password input widget. Note: Despite
PasswordInput
inheriting fromTextInput
the password cannot be inspected on the fieldvalue
. 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.
-
class
Select
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.InputWidget
Single-select widget.
-
callback
¶ property type:
Instance
(Callback
)A callback to run in the browser whenever the current Select dropdown value changes.
-
options
¶ property type:
Either
(List
(Either
(String
,Tuple
(Either
(Int
,String
),String
) ) ),Dict
(String
,List
(Either
(String
,Tuple
(Either
(Int
,String
),String
) ) ) ) )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
-
-
class
Spinner
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.InputWidget
Spinner widget for numerical inputs
-
class
TextInput
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.InputWidget
Single-line input widget.
-
class
TextAreaInput
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.inputs.TextInput
Multi-line input widget.