buttons#
Various kinds of button widgets.
- class AbstractButton(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A base class that defines common properties for all button types.
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.
- icon#
An optional image appearing to the left of button’s text. An instance of
Icon(such asBuiltinIcon,SVGIcon, orTablerIcon).`
- label#
Either HTML or plain text label for the button to display.
- class ButtonLike(*args: Any, **kwargs: Any)[source]#
Shared properties for button-like 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.
- button_type#
A style for the button, signifying it’s role. Possible values are one of the following:
- class Dropdown(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A dropdown button.
- js_on_click(handler: Callback) → None[source]#
Set up a JavaScript handler for button or menu item clicks.
- on_click(handler: EventCallback) → None[source]#
Set up a handler for button or menu item clicks.
- Parameters:
handler (func) – handler function to call when button is activated.
- Returns:
None
- menu#
Button’s dropdown menu consisting of entries containing item’s text and value name. Use
Noneas a menu separator.
- split#
- class HelpButton(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A button with a help symbol that displays additional text when hovered over or clicked.
- tooltip#
A tooltip with plain text or rich HTML contents, providing general help or description of a widget’s or component’s function.
- class Toggle(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A two-state toggle button.
- js_on_click(handler: Callback) → None[source]#
Set up a JavaScript handler for button state changes (clicks).
- on_click(handler: Callable[[bool], None]) → None[source]#
Set up a handler for button state changes (clicks).
- Parameters:
handler (func) – handler function to call when button is toggled.
- Returns:
None
- active#
The state of the toggle button.