Examples¶
This page includes dozens of bite-sized how-to examples to help you get started with marimo. Be sure to also read the quickstart and the user guide, especially the guide on how marimo runs cells.
Get inspired at our gallery!
For inspirational examples, including embedding-driven data labelers, Stanford-scientist authored tutorials, and more, check out our public gallery.
Running cells¶
-
โก๏ธ Basic execution
-
๐ฑ๏ธ Run cells on button click
-
๐ Refresh on a timer
-
๐ Using the debugger
Visual Outputs¶
-
๐ค Cell outputs
-
โ๏ธ Basic markdown
-
๐ฌ Console outputs
-
๐ Showing plots
-
๐๏ธ Conditionally showing outputs
Writing markdown¶
-
โก๏ธ Python values in markdown
-
๐ช Mermaid diagrams
-
๐จ Admonitions
-
๐ Collapsible details
-
๐ Emoji
Working with data¶
Dataframes¶
marimo is designed for working with dataframes. Here are a few examples; see the dataframes guide for details.
-
๐งฎ Interactive dataframe viewer
-
-
โ๏ธ Editable dataframe
-
๐ ๏ธ Interactive dataframe transformer
SQL¶
Here are some basic examples, see the SQL guide for more details.
Plots¶
See the plotting guide for a full overview.
Progress bars and status elements¶
-
๐ถ Progress bar
-
๐ Loading spinner
Layouts¶
-
๐ Horizontal and vertical stacking
-
๐ Accordion toggle
-
๐๏ธ Tabs
Input elements¶
Basic input elements¶
marimo has a large library of interactive UI elements, which you can use without callbacks โ just make sure to assign elements to global variables. See the API reference for a full list, and the interactivity guide for rules governing how UI elements work.
-
๐๏ธ Slider
-
๐งพ Dropdown
-
๐ Multi-select
-
๐ Radio buttons
-
โ๏ธ Checkbox
-
๐ Date
-
๐ File
-
๐ค Text input
-
๐ Text area
-
๐งโ๐ป Code editor
-
๐ Table
-
๐๏ธ Microphone
-
๐ฌ Chat
Composite input elements¶
Composite input elements let you create a single UI element from multiple other UI elements.
-
๐งพ Form
-
๐ Array
-
๐ Dictionary