Skip to content
A

Layout

Loading the Python runtime…

Part 7 of 10 in Learn marimo.

marimo provides functions to help you lay out your output, such as in rows and columns, accordions, tabs, and callouts.

Arrange objects into rows and columns with mo.hstack and mo.vstack.

Customization. The presentation of stacked elements can be customized with some arguments that are best understood by example.

Justifying Html. While you can center or right-justify any object using mo.hstack, Html objects (returned by most marimo functions, and subclassed by most marimo classes) have a shortcut using via their center, right, and left methods.

This markdown is left-justified.

Create expandable shelves of content using mo.accordion:

An accordion can contain multiple items:

Use mo.ui.tabs to display multiple objects in a single tabbed output:

Turn any markdown or HTML into an emphasized callout with the callout method: