Layouts#

marimo has higher-order layout functions that you can use to arrange outputs in rows, columns, tables, tabs, and more.

Stateless#

Unlike elements in marimo.ui, these don’t have any values associated with them but just render their children in a certain way.

marimo.accordion

Accordion of one or more items.

marimo.carousel

Create a carousel of items.

marimo.callout

Build a callout output.

marimo.center

Center an item.

marimo.hstack

Stack items horizontally, in a row.

marimo.left

Left-justify an item.

marimo.right

Right-justify an item.

marimo.tree

Render a nested structure of lists, tuples, or dicts as a tree.

marimo.vstack

Stack items vertically, in a column.

Stateful#

Some elements in marimo.ui are also helpful for layout. These elements do have values associated with them: for example, tabs tracks the selected tab name, and table tracks the selected rows.

marimo.ui.tabs

Display objects in a tabbed view.

marimo.ui.table

A table component with selectable rows.