Inputs#
marimo comes packaged with interactive UI elements that you can use to build
powerful notebooks and apps. These elements are available in marimo.ui
.
An array of UI elements. |
|
Convert an HTML object with templated text into a UI element. |
|
A button with an optional callback and optional value. |
|
A boolean checkbox. |
|
A date picker with an optional start and stop date. |
|
A dictionary of UI elements. |
|
A dropdown menu. |
|
A button or drag-and-drop area to upload a file. |
|
A submittable form linked to a UIElement. |
|
An audio recorder element. |
|
A multiselect input. |
|
A number picker over an interval. |
|
A radio group. |
|
A refresh button that will auto-refresh its descendants for a given interval. |
|
A numeric slider over an interval. |
|
A boolean switch. |
|
A table component. |
|
A text input. |
|
A text area that is larger than |
To use a UI element, assign it to a global variable and output it in a cell.
When you interact with the frontend element, the Python object’s value
attribute is automatically updated, and all cells referencing that object
automatically run with the element’s latest value.