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.
  • Edit mode: Modify the contents of a cell.
Press Escape (Esc) to enter command mode. Press Enter (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.

Reorder cells

Reorder cells using the UI 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:
  • Right-click the cell, then select Delete from the context menu.
  • Select the trash can icon next to the cell.

Add interactive controls

Add interactive controls, or widgets, to notebook cells. Use widgets such as sliders, dropdowns, and buttons to update notebook content dynamically. 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.