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.

marimo.ui.array

An array of UI elements.

marimo.ui.batch

Convert an HTML object with templated text into a UI element.

marimo.ui.button

A button with an optional callback and optional value.

marimo.ui.checkbox

A boolean checkbox.

marimo.ui.date

A date picker with an optional start and stop date.

marimo.ui.dictionary

A dictionary of UI elements.

marimo.ui.dropdown

A dropdown menu.

marimo.ui.file

A button or drag-and-drop area to upload a file.

marimo.ui.form

A submittable form linked to a UIElement.

marimo.ui.microphone

An audio recorder element.

marimo.ui.multiselect

A multiselect input.

marimo.ui.number

A number picker over an interval.

marimo.ui.radio

A radio group.

marimo.ui.refresh

A refresh button that will auto-refresh its descendants for a given interval.

marimo.ui.slider

A numeric slider over an interval.

marimo.ui.switch

A boolean switch.

marimo.ui.table

A table component.

marimo.ui.text

A text input.

marimo.ui.text_area

A text area that is larger than ui.text.

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.