Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Layout

Layout

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

Rows and columns

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.

Accordion

Create expandable shelves of content using mo.accordion:

An accordion can contain multiple items:

Tabs

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

Callout

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