Skip to main content
This page describes common notebook actions, including adding, editing, reordering, and deleting cells, as well as using interactive controls and displaying content.

Edit modes

There are two edit modes:
  • Command mode: Perform actions on cells, such as adding, deleting, and moving them. Press Esc to enter command mode.
  • Edit mode: Change the contents of the selected cell. Press Enter to enter edit mode.

Add a cell

Notebooks support Python, Markdown, and SQL cells. Add a cell using the notebook UI or a keyboard shortcut.
Within a notebook, select the PYTHON, MARKDOWN, or SQL button to create a cell of that type.

Change cell order

Change the order of cells within a notebook using the drag handle or keyboard shortcuts.
Select the drag handle () on the right side of the cell and moving it to the desired position.

Delete a cell

Delete a cell using the UI or a keyboard shortcut.
Use either of the following methods:
  1. Right-click the cell, then select Delete from the context menu.
  2. Select the trash can icon next to the cell.

Add interactive controls

Add interactive elements, such as sliders, dropdowns, and buttons, to notebook cells. When you interact with an element, the notebook updates cells that depend on its value. For example, copy the following code into a cell to create a basic interactive slider:
For more information, see Interactive elements in the marimo documentation.